linux/arch/powerpc
Michael Ellerman 378a6ee99e powerpc/perf: Rework disable logic in pmu_disable()
In pmu_disable() we disable the PMU by setting the FC (Freeze Counters)
bit in MMCR0. In order to do this we have to read/modify/write MMCR0.

It's possible that we read a value from MMCR0 which has PMAO (PMU Alert
Occurred) set. When we write that value back it will cause an interrupt
to occur. We will then end up in the PMU interrupt handler even though
we are supposed to have just disabled the PMU.

We can avoid this by making sure we never write PMAO back. We should not
lose interrupts because when the PMU is re-enabled the overflowed values
will cause another interrupt.

We also reorder the clearing of SAMPLE_ENABLE so that is done after the
PMU is frozen. Otherwise there is a small window between the clearing of
SAMPLE_ENABLE and the setting of FC where we could take an interrupt and
incorrectly see SAMPLE_ENABLE not set. This would for example change the
logic in perf_read_regs().

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
CC: <stable@vger.kernel.org> [v3.10]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-07-01 11:49:54 +10:00
..
boot powerpc: Update currituck pci/usb fixup for new board revision 2013-06-20 16:55:13 +10:00
configs powerpc/pseries: Enable PSTORE in pseries_defconfig 2013-06-25 17:24:40 +10:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include powerpc: Remove KVMTEST from RELON exception handlers 2013-07-01 11:49:40 +10:00
kernel powerpc: Wire up the HV facility unavailable exception 2013-07-01 11:49:47 +10:00
kvm powerpc/kvm: Handle transparent hugepage in KVM 2013-06-21 16:01:55 +10:00
lib powerpc: Fix single step emulation of 32bit overflowed branches 2013-06-20 16:55:13 +10:00
math-emu powerpc/math-emu: Fix decoding of some instructions 2013-06-20 17:05:05 +10:00
mm powerpc/numa: Do not update sysfs cpu registration from invalid context 2013-07-01 11:49:34 +10:00
net filter: bpf_jit_comp: refactor and unify BPF JIT image dump output 2013-03-21 17:25:56 -04:00
oprofile Merge branch 'merge' into next 2013-01-29 11:33:37 +11:00
perf powerpc/perf: Rework disable logic in pmu_disable() 2013-07-01 11:49:54 +10:00
platforms powerpc: Delete __cpuinit usage from all users 2013-07-01 11:10:36 +10:00
sysdev powerpc: Mark low level irq handlers NO_THREAD 2013-06-20 16:55:08 +10:00
xmon Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
Kconfig powerpc/8xx: Remove 8xx specific "minimal FPU emulation" 2013-06-20 17:05:12 +10:00
Kconfig.debug powerpc: Add a configuration option for early BootX/OpenFirmware debug 2013-06-20 16:55:12 +10:00
Makefile powerpc: Avoid load of static chain register when calling nested functions through a pointer on 64bit 2013-01-10 17:01:27 +11:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00