[PATCH] powerpc: Fix accumulate_stolen_time() vs. CONFIG_PREEMPT
The function accumulate_stolen_time() is called on pSeries to scan the hypervisor event log every now and then. This happens very early during the exception entry process, while the PACA soft/hard_enabled fields don't properly reflect the state of the system, which is basically hard irq disabled. This causes various debug checks to trigger when CONFIG_PREEMPT is enabled which can themselves cause the machine to crash due to the unexpected context they are called from. We fix that by temporarily setting the PACA fields to reflect the hard disabled state in accumulate_stolen_time(). This keeps the overhead to that function, hopefully called rarely and only on those pSeries machines. Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 0104069..714685c 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -265,11 +265,26 @@ void accumulate_stolen_time(void) { u64 sst, ust; - sst = scan_dispatch_log(get_paca()->starttime_user); - ust = scan_dispatch_log(get_paca()->starttime); - get_paca()->system_time -= sst; - get_paca()->user_time -= ust; - get_paca()->stolen_time += ust + sst; + u8 save_soft_enabled = local_paca->soft_enabled; + u8 save_hard_enabled = local_paca->hard_enabled; + + /* We are called early in the exception entry, before +* soft/hard_enabled are sync'ed to the expected state +* for the exception. We are hard disabled but the PACA +* needs to reflect that so various debug stuff doesn't +* complain +*/ + local_paca->soft_enabled = 0; + local_paca->hard_enabled = 0; + + sst = scan_dispatch_log(local_paca->starttime_user); + ust = scan_dispatch_log(local_paca->starttime); + local_paca->system_time -= sst; + local_paca->user_time -= ust; + local_paca->stolen_time += ust + sst; + + local_paca->soft_enabled = save_soft_enabled; + local_paca->hard_enabled = save_hard_enabled; } static inline u64 calculate_stolen_time(u64 stop_tb) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH net-next-2.6] netdev: ucc_geth: Use is_multicast_ether_addr helper
From: Tobias Klauser Date: Wed, 12 Jan 2011 10:31:01 +0100 > Signed-off-by: Tobias Klauser Applied. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc/85xx: fix compatible properties of the P1022DS DMA nodes used for audio
On Dec 3, 2010, at 10:52 AM, Timur Tabi wrote: > In order to prevent the fsl_dma driver from claiming the DMA channels that the > P1022DS audio driver needs, the compatible properties for those nodes must say > "fsl,ssi-dma-channel" instead of "fsl,eloplus-dma-channel". > > Signed-off-by: Timur Tabi > --- > > Kumar, please pick up this patch for 2.6.37. > > arch/powerpc/boot/dts/p1022ds.dts |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) applied to next - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: fix warning when compiling immap_qe.h
On Oct 14, 2010, at 3:15 PM, Timur Tabi wrote: > Fix the warnings genereted by arch/powerpc/include/asm/immap_qe.h when > CONFIG_PHYS_ADDR_T_64BIT is defined: > > immap_qe.h: In function 'immrbar_virt_to_phys': > immap_qe.h:472:8: warning: cast from pointer to integer of different size > immap_qe.h:472:24: warning: cast from pointer to integer of different size > immap_qe.h:473:5: warning: cast from pointer to integer of different size > immap_qe.h:473:21: warning: cast from pointer to integer of different size > immap_qe.h:474:36: warning: cast from pointer to integer of different size > > Note that the QE does not support 36-bit physical addresses, so even when > CONFIG_PHYS_ADDR_T_64BIT is defined, the QE MURAM must be located below the > 4GB boundary. > > Signed-off-by: Timur Tabi > --- > arch/powerpc/include/asm/immap_qe.h | 21 +++-- > 1 files changed, 15 insertions(+), 6 deletions(-) applied to next - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[git pull] Please pull powerpc.git next branch
[ I know I'm way way way way late, but combo of holidays and getting sick. Please push as these are pretty minor changes ] The following changes since commit 0c21e3aaf6ae85bee804a325aa29c325209180fd: Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus (2011-01-07 17:16:27 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git next Ilya Yanok (1): powerpc/mpc8308: fix USB DR controller initialization Li Yang (1): powerpc/85xx: add e500 HID1 bit definition Shaohui Xie (1): powerpc/fsl_rio: Fix non-standard HID1 register access Timur Tabi (2): powerpc/85xx: fix compatible properties of the P1022DS DMA nodes used for audio powerpc: fix warning when compiling immap_qe.h arch/powerpc/boot/dts/mpc8308rdb.dts |2 +- arch/powerpc/boot/dts/p1022ds.dts |4 ++-- arch/powerpc/include/asm/immap_qe.h | 21 +++-- arch/powerpc/include/asm/reg.h|2 ++ arch/powerpc/include/asm/reg_booke.h | 14 ++ arch/powerpc/kernel/cpu_setup_fsl_booke.S |6 ++ arch/powerpc/platforms/83xx/mpc83xx.h |2 ++ arch/powerpc/platforms/83xx/usb.c | 21 - arch/powerpc/sysdev/fsl_rio.c |2 -- 9 files changed, 58 insertions(+), 16 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] Globally s/struct irq_host/struct irq_domain/
On Wed, Jan 12, 2011 at 07:53:11AM -0600, Jon Loeliger wrote: >From: Jon Loeliger > >Just rename the irq_host structure as irq_domain to lessen the >confusion around the word "host". Updated a few comments and >error messages to use "irq_domain" when refering to the structure. > >Suggested by Ben Herrenschmidt on the device-tree mailing list. > >Signed-off-by: Jon Loeliger For the uic.c part: Acked-by: Josh Boyer josh ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/2] powerpc: Enable 64kB pages and 1024 threads in pseries config
- Enable 64kB pages so it gets some regular testing. - The largest POWER7 has 1024 threads so bump NR_CPUS it to match. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/configs/pseries_defconfig === --- powerpc.git.orig/arch/powerpc/configs/pseries_defconfig 2011-01-12 22:51:34.101760097 +1100 +++ powerpc.git/arch/powerpc/configs/pseries_defconfig 2011-01-12 22:52:47.434064107 +1100 @@ -2,7 +2,7 @@ CONFIG_PPC64=y CONFIG_ALTIVEC=y CONFIG_VSX=y CONFIG_SMP=y -CONFIG_NR_CPUS=128 +CONFIG_NR_CPUS=1024 CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y @@ -45,6 +45,8 @@ CONFIG_KEXEC=y CONFIG_IRQ_ALL_CPUS=y CONFIG_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTREMOVE=y +CONFIG_PPC_64K_PAGES=y +CONFIG_PPC_SUBPAGE_PROT=y CONFIG_SCHED_SMT=y CONFIG_HOTPLUG_PCI=m CONFIG_HOTPLUG_PCI_RPA=m ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/2] powerpc: Disable mcount tracers in pseries config
IRQSOFF_TRACER and STACK_TRACER force the kernel to be built with -pg which is a substantial overhead. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/configs/pseries_defconfig === --- powerpc.git.orig/arch/powerpc/configs/pseries_defconfig 2011-01-11 14:34:38.890639046 +1100 +++ powerpc.git/arch/powerpc/configs/pseries_defconfig 2011-01-12 23:06:28.770355258 +1100 @@ -311,9 +311,7 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_RCU_CPU_STALL_DETECTOR is not set CONFIG_LATENCYTOP=y CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_IRQSOFF_TRACER=y CONFIG_SCHED_TRACER=y -CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH net-next-2.6] netdev: ucc_geth: Use is_multicast_ether_addr helper
Signed-off-by: Tobias Klauser --- drivers/net/ucc_geth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 73a3e0d..715e7b4 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -2032,7 +2032,7 @@ static void ucc_geth_set_multi(struct net_device *dev) netdev_for_each_mc_addr(ha, dev) { /* Only support group multicast for now. */ - if (!(ha->addr[0] & 1)) + if (!is_multicast_ether_addr(ha->addr)) continue; /* Ask CPM to run CRC and set bit in -- 1.7.0.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev