android_kernel_samsung_msm8976/arch
Michael Ellerman 8cf3478f19 powerpc/perf: Rework disable logic in pmu_disable()
commit 378a6ee99e4a431ec84e4e61893445c041c93007 upstream.

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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25 14:07:22 -07:00
..
alpha
arc ARC: lazy dcache flush broke gdb in non-aliasing configs 2013-05-25 14:15:55 +05:30
arm ARM: mm: fix boot on SA1110 Assabet 2013-07-21 18:21:35 -07:00
arm64 perf: arm64: Record the user-mode PC in the call chain. 2013-06-20 10:16:39 +01:00
avr32
blackfin
c6x arch: c6x: mm: include "asm/uaccess.h" to pass compiling 2013-07-21 18:21:29 -07:00
cris
frv
h8300
hexagon
ia64 [IA64] Fix include dependency in asm/irqflags.h 2013-06-17 13:39:52 -07:00
m32r
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2013-06-08 11:50:17 -07:00
metag metag: fix mm/hugetlb.c build breakage 2013-06-19 06:23:34 -10:00
microblaze microblaze: Use static inline functions in cacheflush.h 2013-06-03 11:33:23 +02:00
mips Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-06-12 11:48:14 -07:00
mn10300 mn10300: Use early_param() to parse "mem=" parameter 2013-06-28 16:53:03 +01:00
openrisc
parisc parisc: optimize mtsp(0,sr) inline assembly 2013-07-21 18:21:26 -07:00
powerpc powerpc/perf: Rework disable logic in pmu_disable() 2013-07-25 14:07:22 -07:00
s390 s390/ipl: Fix FCP WWPN and LUN format strings for read 2013-06-24 11:16:34 +02:00
score score: remove redundant kcore_list entries 2013-05-25 10:27:27 -07:00
sh
sparc sparc: tsb must be flushed before tlb 2013-06-19 02:10:30 -07:00
tile tilepro: work around module link error with gcc 4.7 2013-06-15 16:47:47 -04:00
um mconsole: we'd better initialize pos before passing it to vfs_read()... 2013-06-19 12:37:57 +04:00
unicore32
x86 xen/time: remove blocked time accounting from xen "clockchip" 2013-07-21 18:21:27 -07:00
xtensa
.gitignore
Kconfig