From 075b9cd66236191e8f5ce1668e0a601caa8c3570 Mon Sep 17 00:00:00 2001 From: Jochen Friedrich Date: Thu, 22 Nov 2007 17:53:47 +0100 Subject: [PATCH 1/7] [POWERPC] Fix typo #ifdef -> #ifndef fpi->cp_command should be overwritten only if CONFIG_PPC_CPM_NEW_BINDING is NOT set. Otherwise it is already set from the device tree. Signed-off-by: Jochen Friedrich Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Vitaly Bordug Signed-off-by: Kumar Gala --- drivers/net/fs_enet/mac-scc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 03134f47a4e..48f2f300593 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c @@ -158,7 +158,7 @@ static int setup_data(struct net_device *dev) { struct fs_enet_private *fep = netdev_priv(dev); -#ifdef CONFIG_PPC_CPM_NEW_BINDING +#ifndef CONFIG_PPC_CPM_NEW_BINDING struct fs_platform_info *fpi = fep->fpi; fep->scc.idx = fs_get_scc_index(fpi->fs_no); From 9ac68d379e73e469b62149ee2dcc19547d3d992c Mon Sep 17 00:00:00 2001 From: Jochen Friedrich Date: Thu, 22 Nov 2007 17:53:54 +0100 Subject: [PATCH 2/7] [POWERPC] Kill non-existent symbols from ksyms and commproc.h Remove exports of __res and cpm_install_handler/cpm_free_handler. Remove cpm_install_handler/cpm_free_handler from the commproc.h as well. Both were used for ARCH=ppc and aren't defined for ARCH=powerpc. CC arch/powerpc/kernel/ppc_ksyms.o arch/powerpc/kernel/ppc_ksyms.c:180: error: '__res' undeclared here (not in a function) arch/powerpc/kernel/ppc_ksyms.c:180: warning: type defaults to 'int' in declaration of '__res' make[1]: *** [arch/powerpc/kernel/ppc_ksyms.o] Error 1 make: *** [arch/powerpc/kernel] Error 2 LD .tmp_vmlinux1 arch/powerpc/kernel/built-in.o:(__ksymtab+0x198): undefined reference to `cpm_free_handler' arch/powerpc/kernel/built-in.o:(__ksymtab+0x1a0): undefined reference to `cpm_install_handler' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Jochen Friedrich Signed-off-by: Andrew Morton Signed-off-by: Vitaly Bordug Signed-off-by: Kumar Gala --- arch/powerpc/kernel/ppc_ksyms.c | 12 ------------ include/asm-powerpc/commproc.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index c6b1aa3efbb..13ebeb2d71e 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c @@ -45,10 +45,6 @@ #include #include -#ifdef CONFIG_8xx -#include -#endif - #ifdef CONFIG_PPC64 EXPORT_SYMBOL(local_irq_restore); #endif @@ -172,14 +168,6 @@ EXPORT_SYMBOL(console_drivers); EXPORT_SYMBOL(cacheable_memcpy); #endif -#ifdef CONFIG_8xx -EXPORT_SYMBOL(cpm_install_handler); -EXPORT_SYMBOL(cpm_free_handler); -#endif /* CONFIG_8xx */ -#if defined(CONFIG_8xx) -EXPORT_SYMBOL(__res); -#endif - #ifdef CONFIG_PPC32 EXPORT_SYMBOL(next_mmu_context); EXPORT_SYMBOL(set_context); diff --git a/include/asm-powerpc/commproc.h b/include/asm-powerpc/commproc.h index a2328b8addd..2ee59d7b335 100644 --- a/include/asm-powerpc/commproc.h +++ b/include/asm-powerpc/commproc.h @@ -698,9 +698,6 @@ typedef struct risc_timer_pram { #define CICR_IEN ((uint)0x00000080) /* Int. enable */ #define CICR_SPS ((uint)0x00000001) /* SCC Spread */ -extern void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id); -extern void cpm_free_handler(int vec); - #define IMAP_ADDR (get_immrbase()) #define CPM_PIN_INPUT 0 From cd2150bca97822609fabbb77063a1a20149f5657 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Wed, 12 Dec 2007 16:54:32 -0600 Subject: [PATCH 3/7] [POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset(). Signed-off-by: Scott Wood Signed-off-by: Kumar Gala --- arch/powerpc/sysdev/cpm2_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c index 859362fecb7..c1d82403202 100644 --- a/arch/powerpc/sysdev/cpm2_common.c +++ b/arch/powerpc/sysdev/cpm2_common.c @@ -61,8 +61,7 @@ cpm2_map_t __iomem *cpm2_immr; of space for CPM as it is larger than on PQ2 */ -void -cpm2_reset(void) +void __init cpm2_reset(void) { #ifdef CONFIG_PPC_85xx cpm2_immr = ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); From e8b5f43f7b572a898c7b17e9949b26e7362e7f31 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Mon, 10 Dec 2007 11:10:45 -0600 Subject: [PATCH 4/7] [POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC This was recently made configurable, and needs to be set for these boards. Signed-off-by: Scott Wood Signed-off-by: Kumar Gala --- arch/powerpc/configs/mpc8272_ads_defconfig | 6 +++--- arch/powerpc/configs/pq2fads_defconfig | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig index a31b7a030a6..5eae305215d 100644 --- a/arch/powerpc/configs/mpc8272_ads_defconfig +++ b/arch/powerpc/configs/mpc8272_ads_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc4 -# Thu Dec 6 16:48:30 2007 +# Linux kernel version: 2.6.24-rc5 +# Thu Dec 13 22:40:57 2007 # # CONFIG_PPC64 is not set @@ -491,7 +491,7 @@ CONFIG_MII=y CONFIG_FS_ENET=y # CONFIG_FS_ENET_HAS_SCC is not set CONFIG_FS_ENET_HAS_FCC=y -# CONFIG_FS_ENET_MDIO_FCC is not set +CONFIG_FS_ENET_MDIO_FCC=y CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig index 142d206d687..a3bfbb65a93 100644 --- a/arch/powerpc/configs/pq2fads_defconfig +++ b/arch/powerpc/configs/pq2fads_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc4 -# Thu Dec 6 16:49:09 2007 +# Linux kernel version: 2.6.24-rc5 +# Thu Dec 13 22:39:18 2007 # # CONFIG_PPC64 is not set @@ -548,7 +548,7 @@ CONFIG_MII=y CONFIG_FS_ENET=y # CONFIG_FS_ENET_HAS_SCC is not set CONFIG_FS_ENET_HAS_FCC=y -# CONFIG_FS_ENET_MDIO_FCC is not set +CONFIG_FS_ENET_MDIO_FCC=y CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set From 88f0178e6ec2c73167de973e4af86905b4dbfd45 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 12 Dec 2007 14:58:12 +1100 Subject: [PATCH 5/7] [POWERPC] iSeries: don't printk with HV spinlock held Printk was observed to hang during module unload due to a limited window of characters that may be sent to the hypervisor. The window only reexpands when we receive an ack from the HV and the spinlock here prevents us from ever processing that ack. This fixes it by dropping the lock before doing the printk, then looping back to the top to reacquire the lock. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/iseries/lpevents.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 34bdbbe3ce5..275f4944983 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c @@ -121,6 +121,7 @@ void process_hvlpevents(void) { struct HvLpEvent * event; + restart: /* If we have recursed, just return */ if (!spin_trylock(&hvlpevent_queue.hq_lock)) return; @@ -146,8 +147,20 @@ void process_hvlpevents(void) if (event->xType < HvLpEvent_Type_NumTypes && lpEventHandler[event->xType]) lpEventHandler[event->xType](event); - else - printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType ); + else { + u8 type = event->xType; + + /* + * Don't printk in the spinlock as printk + * may require ack events form the HV to send + * any characters there. + */ + hvlpevent_clear_valid(event); + spin_unlock(&hvlpevent_queue.hq_lock); + printk(KERN_INFO + "Unexpected Lp Event type=%d\n", type); + goto restart; + } hvlpevent_clear_valid(event); } else if (hvlpevent_queue.hq_overflow_pending) From c89686210542f6946e48a907772a356b9fce03f0 Mon Sep 17 00:00:00 2001 From: Liu Yu Date: Mon, 10 Dec 2007 13:00:52 +0800 Subject: [PATCH 6/7] [POWERPC] Fix rounding bug in emulation for double float operating This patch fixes rounding bug in emulation for double float operating on PowerPC platform. When pack double float operand, it need to truncate the tail due to the limited precision. If the truncated part is not zero, the last bit of work bit (totally 3 bits) need to '|' 1. This patch is completed in _FP_FRAC_SRS_2(X,N,sz) (arch/powerpc/math-emu/op-2.h). Originally the code leftwards rotates the operand to just keep the truncated part, then check whether it is zero. However, the number it rotates is not correct when N is not smaller than _FP_W_TYPE_SIZE, and it will cause the work bit '|' 1 in the improper case. This patch fixes this issue. Signed-off-by: Liu Yu Signed-off-by: Kumar Gala --- arch/powerpc/math-emu/op-2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/math-emu/op-2.h b/arch/powerpc/math-emu/op-2.h index b9b06b4c6ea..7d6f17cc292 100644 --- a/arch/powerpc/math-emu/op-2.h +++ b/arch/powerpc/math-emu/op-2.h @@ -59,7 +59,8 @@ else \ { \ X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE) | \ - (((X##_f1 << (sz - (N))) | X##_f0) != 0)); \ + (((X##_f1 << (2 * _FP_W_TYPE_SIZE - (N))) | \ + X##_f0) != 0)); \ X##_f1 = 0; \ } \ } while (0) From eb8dc843fc3c0dbac553ec79d7e5b4d8339aeb3d Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Mon, 10 Dec 2007 15:17:43 +1100 Subject: [PATCH 7/7] [POWERPC] Make PS3_SYS_MANAGER default y, not m Currently it's impossible to build a ps3_defconfig which will reboot without modules installed. This makes it all too easy to find yourself with a PS3 that won't reboot. This is because the system manager driver, which provides the reboot mechanism, is only selectable if PS3_ADVANCED is set, else it defaults to m. In ps3_defconfig PS3_ADVANCED is not set, therefore the system manager is built as a module. It would be desirable IMHO for the defconfig to produce a kernel that boots and reboots, without needing modules to be installed. Signed-off-by: Michael Ellerman Acked-by: Geoff Levand Signed-off-by: Paul Mackerras --- arch/powerpc/configs/ps3_defconfig | 2 +- arch/powerpc/platforms/ps3/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index 5bd547ecd60..0b5469fb6e0 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig @@ -157,7 +157,7 @@ CONFIG_PS3_HTAB_SIZE=20 CONFIG_PS3_USE_LPAR_ADDR=y CONFIG_PS3_VUART=y CONFIG_PS3_PS3AV=y -CONFIG_PS3_SYS_MANAGER=m +CONFIG_PS3_SYS_MANAGER=y CONFIG_PS3_STORAGE=y CONFIG_PS3_DISK=y CONFIG_PS3_ROM=y diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index 67144d1d140..298f1c9679f 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig @@ -91,7 +91,7 @@ config PS3_SYS_MANAGER depends on PPC_PS3 tristate "PS3 System Manager driver" if PS3_ADVANCED select PS3_VUART - default m + default y help Include support for the PS3 System Manager.