[PATCH] powerpc/perf_event: Fix oops due to perf_event_do_pending call

Michael Ellerman michael at ellerman.id.au
Wed Apr 14 22:11:09 EST 2010


On Wed, 2010-04-14 at 16:46 +1000, Paul Mackerras wrote:
> Anton Blanchard found that large POWER systems would occasionally
> crash in the exception exit path when profiling with perf_events.
> The symptom was that an interrupt would occur late in the exit path
> when the MSR[RI] (recoverable interrupt) bit was clear.  Interrupts
> should be hard-disabled at this point but they were enabled.  Because
> the interrupt was not recoverable the system panicked.
> 
...
> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
> index 1b16b9a..0441bbd 100644
> --- a/arch/powerpc/kernel/time.c
> +++ b/arch/powerpc/kernel/time.c
> @@ -532,25 +532,60 @@ void __init iSeries_time_init_early(void)
>  }
>  #endif /* CONFIG_PPC_ISERIES */
>  
> -#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_PPC32)
> -DEFINE_PER_CPU(u8, perf_event_pending);
> +#ifdef CONFIG_PERF_EVENTS
>  
> -void set_perf_event_pending(void)
> +/*
> + * 64-bit uses a byte in the PACA, 32-bit uses a per-cpu variable...
> + */

Any reason not to switch to per-cpu for both, now that you don't need to
access it from asm?

cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100414/9405fb51/attachment.pgp>


More information about the Linuxppc-dev mailing list