linux/arch/powerpc
Maynard Johnson e5fc948b11 powerpc: Fix oprofile sampling of marked events on POWER7
Description
-----------
Change ppc64 oprofile kernel driver to use the SLOT bits (MMCRA[37:39]only on
older processors where those bits are defined.

Background
----------
The performance monitor unit of the 64-bit POWER processor family has the
ability to collect accurate instruction-level samples when profiling on marked
events (i.e., "PM_MRK_<event-name>").  In processors prior to POWER6, the MMCRA
register contained "slot information" that the oprofile kernel driver used to
adjust the value latched in the SIAR at the time of a PMU interrupt.  But as of
POWER6, these slot bits in MMCRA are no longer necessary for oprofile to use,
since the SIAR itself holds the accurate sampled instruction address.  With
POWER6, these MMCRA slot bits were zero'ed out by hardware so oprofile's use of
these slot bits was, in effect, a NOP.  But with POWER7, these bits are no
longer zero'ed out; however, they serve some other purpose rather than slot
information.  Thus, using these bits on POWER7 to adjust the SIAR value results
in samples being attributed to the wrong instructions.  The attached patch
changes the oprofile kernel driver to ignore these slot bits on all newer
processors starting with POWER6.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Signed-off-by: Michael Wolf <mjw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-05-15 16:43:41 +10:00
..
boot powerpc: Fix mktree build error on Mac OS X host 2009-05-15 16:43:41 +10:00
configs powerpc/8xx: Update defconfigs 2009-05-13 17:29:08 -05:00
include/asm powerpc/iseries: Fix pci breakage due to bad dma_data initialization 2009-05-15 16:43:41 +10:00
kernel powerpc: Fix setting of oprofile cpu type 2009-05-01 15:12:05 +10:00
kvm KVM: ppc: e500: Fix the bug that KVM is unstable in SMP 2009-03-24 11:03:15 +02:00
lib Merge commit 'origin/master' into next 2009-03-11 17:10:07 +11:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm powerpc: fix for long standing bug noticed by gcc 4.4.0 2009-04-23 08:52:16 -05:00
oprofile powerpc: Fix oprofile sampling of marked events on POWER7 2009-05-15 16:43:41 +10:00
platforms powerpc/iseries: Fix pci breakage due to bad dma_data initialization 2009-05-15 16:43:41 +10:00
sysdev powerpc/virtex: Fix duplicate level irq events. 2009-05-14 10:23:11 -06:00
xmon powerpc: Prepare xmon_save_regs for use with kdump 2008-12-23 15:13:28 +11:00
Kconfig powerpc: Allow 256kB pages with SHMEM 2009-04-15 15:23:53 +10:00
Kconfig.debug generic debug pagealloc: build fix 2009-04-02 19:04:48 -07:00
Makefile powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00