android_kernel_motorola_sm6225/arch
Paul Mackerras 87a72f9e17 [POWERPC] Fix performance monitor on machines with logical PVR
Some IBM machines supply a "logical" PVR (processor version register)
value in the device tree in the cpu nodes rather than the real PVR.
This is used for instance to indicate that the processors in a POWER6
partition have been configured by the hypervisor to run in POWER5+
mode rather than POWER6 mode.  To cope with this, we call identify_cpu
a second time with the logical PVR value (the first call is with the
real PVR value in the very early setup code).

However, POWER5+ machines can also supply a logical PVR value, and use
the same value (the value that indicates a v2.04 architecture
compliant processor).  This causes problems for code that uses the
performance monitor (such as oprofile), because the PMU registers are
different in POWER6 (even in POWER5+ mode) from the real POWER5+.

This change works around this problem by taking out the PMU
information from the cputable entries for the logical PVR values, and
changing identify_cpu so that the second call to it won't overwrite
the PMU information that was established by the first call (the one
with the real PVR), but does update the other fields.  Specifically,
if the cputable entry for the logical PVR value has num_pmcs == 0,
none of the PMU-related fields get used.

So that we can create a mixed cputable entry, we now make cur_cpu_spec
point to a single static struct cpu_spec, and copy stuff from
cpu_specs[i] into it.  This has the side-effect that we can now make
cpu_specs[] be initdata.

Ultimately it would be good to move the PMU-related fields out to a
separate structure, pointed to by the cputable entries, and change
identify_cpu so that it saves the PMU info pointer, copies the whole
structure, and restores the PMU info pointer, rather than identify_cpu
having to list all the fields that are *not* PMU-related.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-10-11 21:37:50 +10:00
..
alpha alpha: -Werror fixes for sys_titan.c 2007-08-11 15:47:42 -07:00
arm [ARM] Resolve PCI section warnings 2007-09-30 17:36:22 +01:00
avr32 [AVR32] Wire up i2c-gpio on the ATNGW100 board 2007-08-15 16:36:55 +02:00
blackfin Blackfin arch: Update/Fix PM support add new pm_ops valid 2007-08-27 17:29:10 +08:00
cris ide: fix hidden dependencies on CONFIG_IDE_GENERIC 2007-08-20 22:42:54 +02:00
frv FRV: connect up fallocate 2007-08-11 15:47:40 -07:00
h8300 H8/300: Fix misnamed "CONFIG_BLKDEV_RESERVE_ADDRESS" Kconfig variable 2007-09-11 17:21:20 -07:00
i386 [x86 setup] Correct the SMAP check for INT 0x15, AX=0xe820 2007-09-28 10:12:44 -07:00
ia64 Fix spurious syscall tracing after PTRACE_DETACH + PTRACE_ATTACH 2007-09-10 18:57:47 -07:00
m32r m32r: Rename STI/CLI macros 2007-09-06 11:10:56 +09:00
m68k m68k(nommu): add missing syscalls 2007-09-11 17:21:20 -07:00
m68knommu m68k(nommu): add missing syscalls 2007-09-11 17:21:20 -07:00
mips [MIPS] vmlinux.lds.S: Handle note sections 2007-10-01 14:17:50 +01:00
parisc [PARISC] Add NOTES section 2007-08-27 00:29:25 -04:00
powerpc [POWERPC] Fix performance monitor on machines with logical PVR 2007-10-11 21:37:50 +10:00
ppc [POWERPC] Remove redundant reference to non-existent CONFIG_BOOTIMG 2007-10-09 21:02:00 +10:00
s390 [S390] kprobes: fix instruction length calculation 2007-08-22 13:51:49 +02:00
sh sh: missing symbol fix for sh4-202 2007-08-22 13:32:07 +09:00
sh64 sh64: arch/sh64/kernel/setup.c: duplicate include removal. 2007-08-12 12:18:54 +09:00
sparc [SPARC]: Fix EBUS use of uninitialized variable. 2007-09-27 13:09:28 -07:00
sparc64 [SPARC64]: Fix missing load-twin usage in Niagara-1 memcpy. 2007-10-02 01:03:09 -07:00
um uml: fix irqstack crash 2007-09-19 11:24:18 -07:00
v850 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
x86_64 x86_64: increase VDSO_TEXT_OFFSET for ancient binutils 2007-10-01 19:21:30 -07:00
xtensa xtensa process.c must #include <linux/fs.h> 2007-08-30 09:58:22 -07:00