kernel-fxtec-pro1x/arch/powerpc
Paul Mackerras 0fe1ac48be powerpc/perf_event: Fix oops due to perf_event_do_pending call
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.

The reason is that the exception exit path was calling
perf_event_do_pending after hard-disabling interrupts, and
perf_event_do_pending will re-enable interrupts.

The simplest and cleanest fix for this is to use the same mechanism
that 32-bit powerpc does, namely to cause a self-IPI by setting the
decrementer to 1.  This means we can remove the tests in the exception
exit path and raw_local_irq_restore.

This also makes sure that the call to perf_event_do_pending from
timer_interrupt() happens within irq_enter/irq_exit.  (Note that
calling perf_event_do_pending from timer_interrupt does not mean that
there is a possible 1/HZ latency; setting the decrementer to 1 ensures
that the timer interrupt will happen immediately, i.e. within one
timebase tick, which is a few nanoseconds or 10s of nanoseconds.)

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: stable@kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-05-12 14:34:00 +10:00
..
boot Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-03-12 16:06:51 -08:00
configs powerpc/ps3: Update ps3_defconfig 2010-04-28 16:23:24 +10:00
include/asm powerpc/perf_event: Fix oops due to perf_event_do_pending call 2010-05-12 14:34:00 +10:00
kernel powerpc/perf_event: Fix oops due to perf_event_do_pending call 2010-05-12 14:34:00 +10:00
kvm KVM: fix the handling of dirty bitmaps to avoid overflows 2010-04-20 13:06:55 +03:00
lib include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
math-emu
mm Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb 2010-04-29 20:01:42 -07:00
oprofile include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
platforms powerpc/pseries: Flush lazy kernel mappings after unplug operations 2010-04-28 16:23:24 +10:00
sysdev powerpc/fsl-cpm: Configure clock correctly for SCC 2010-04-19 23:13:03 -05:00
xmon powerpc: Mark some variables in the page fault path __read_mostly 2010-02-03 17:39:48 +11:00
Kconfig powerpc: Remove IOMMU_VMERGE config option 2010-03-19 16:38:16 +11:00
Kconfig.debug Merge branch 'next' of git://git.secretlab.ca/git/linux-2.6 2009-12-16 13:26:53 -08:00
Makefile powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00
relocs_check.pl powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00