linux/arch/powerpc/kernel
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
..
vdso32 [POWERPC] Update .gitignore for new vdso generated files 2007-10-08 08:38:12 -05:00
vdso64 [POWERPC] Update .gitignore for new vdso generated files 2007-10-08 08:38:12 -05:00
Makefile [POWERPC] 8xx: Move softemu8xx.c from arch/ppc 2007-10-04 11:02:54 -05:00
align.c [POWERPC] Handle alignment faults on SPE load/store instructions 2007-09-14 08:51:48 -05:00
asm-offsets.c [POWERPC] Size swapper_pg_dir correctly 2007-09-19 15:25:34 +10:00
audit.c [PATCH] audit signal recipients 2007-05-11 05:38:25 -04:00
binfmt_elf32.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
btext.c [POWERPC] Clean out a bunch of duplicate includes 2007-08-17 11:01:51 +10:00
clock.c [POWERPC] clk.h interface for platforms 2007-10-03 09:11:56 +10:00
compat_audit.c [PATCH] add SIGNAL syscall class (v3) 2007-05-11 05:38:25 -04:00
cpu_setup_6xx.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpu_setup_44x.S [POWERPC] 4xx: 440EPx/GRx incorrect write to DDR SDRAM errata workaround 2007-10-03 07:20:18 -05:00
cpu_setup_pa6t.S [POWERPC] pasemi: Enable one more hid bit 2007-04-24 21:31:49 +10:00
cpu_setup_ppc970.S [POWERPC] powerpc: Enable DEEPNAP power savings mode on 970MP 2006-10-16 16:32:25 +10:00
cputable.c [POWERPC] Fix performance monitor on machines with logical PVR 2007-10-11 21:37:50 +10:00
crash.c [POWERPC] Clean out a bunch of duplicate includes 2007-08-17 11:01:51 +10:00
crash_dump.c [POWERPC] FWNMI is only used on pSeries 2007-09-19 15:25:34 +10:00
dma_64.c [POWERPC] Make direct DMA use node local allocations 2006-12-04 20:38:59 +11:00
entry_32.S [POWERPC] Add cpu feature for SPE handling 2007-09-14 08:53:30 -05:00
entry_64.S [POWERPC] Remove barriers from the SLB shadow buffer update 2007-09-19 14:40:54 +10:00
firmware.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
fpu.S [POWERPC] Restore copyright notice in arch/powerpc/kernel/fpu.S 2006-08-30 14:45:35 +10:00
head_8xx.S [POWERPC] 8xx: Work around CPU15 erratum. 2007-10-03 20:36:36 -05:00
head_32.S [POWERPC] Add early debug console for CPM serial ports. 2007-10-03 20:35:43 -05:00
head_40x.S [POWERPC] Remove cmd_line from head*.S 2007-09-19 15:25:34 +10:00
head_44x.S [POWERPC] 4xx: Move 440EP(x) FPU setup from head_44x to cpu_setup_4xx 2007-10-03 07:20:17 -05:00
head_64.S [POWERPC] FWNMI is only used on pSeries 2007-09-19 15:25:34 +10:00
head_booke.h [PATCH] powerpc: Fix Kernel FP unavail exception for BookE 2006-02-10 16:51:50 +11:00
head_fsl_booke.S [POWERPC] Cleaned up whitespace in head_fsl_booke.S 2007-10-04 11:03:06 -05:00
ibmebus.c [POWERPC] ibmebus: More descriptive error return code in ibmebus_store_probe() 2007-10-03 13:25:28 +10:00
idle.c [POWERPC] Enable tickless idle and high res timers for powerpc 2007-10-03 15:44:34 +10:00
idle_6xx.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
idle_power4.S [POWERPC] powermac: Support G5 CPU hotplug 2007-05-07 20:31:13 +10:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
io.c [POWERPC] Move inline asm eieio to using eieio inline function 2007-07-10 00:33:14 -05:00
iomap.c [POWERPC] Add 64-bit resources support to pci_iomap 2007-09-20 07:36:52 -05:00
iommu.c [POWERPC] Clean out a bunch of duplicate includes 2007-08-17 11:01:51 +10:00
irq.c [POWERPC] Limit range of __init_ref_ok somewhat 2007-10-03 11:48:44 +10:00
isa-bridge.c [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
kprobes.c jprobes: make jprobes a little safer for users 2007-07-19 10:04:44 -07:00
l2cr_6xx.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
legacy_serial.c [POWERPC] Move serial_dev_init to device_initcall() 2007-09-13 04:09:14 +10:00
lparcfg.c [POWERPC] ppc64: support CONFIG_DEBUG_PREEMPT 2007-10-03 11:48:44 +10:00
machine_kexec.c [POWERPC] Move some kexec logic into machine_kexec.c 2006-08-17 16:41:10 +10:00
machine_kexec_32.c Storage class should be first 2006-06-26 18:57:34 +02:00
machine_kexec_64.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
misc.S [POWERPC] convert string i/o operations to C 2006-09-20 14:06:18 +10:00
misc_32.S [POWERPC] Fix small race in 44x tlbie function 2007-08-15 15:12:50 +10:00
misc_64.S [POWERPC] kexec: Send slaves to new kernel earlier 2007-06-25 16:55:16 +10:00
module_32.c [POWERPC] Add support for R_PPC_ADDR16_HI relocations 2007-01-24 21:13:58 +11:00
module_64.c [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
msi.c [POWERPC] PowerPC MSI infrastructure 2007-05-08 13:40:31 +10:00
nvram_64.c [POWERPC] pseries: Eliminate global error_log_cnt variable 2007-08-17 11:01:52 +10:00
of_device.c Begin to consolidate of_device.c 2007-07-20 13:39:59 +10:00
of_platform.c [POWERPC] Prepare to remove of_platform_driver name 2007-10-09 21:00:48 +10:00
paca.c [POWERPC] Implement SLB shadow buffer 2006-08-08 17:08:56 +10:00
pci-common.c [POWERPC] Use alloc_maybe_bootmem() in pcibios_alloc_controller 2007-10-03 15:31:35 +10:00
pci_32.c [POWERPC] null_pci_ops: Use named structure member initializers 2007-08-17 11:01:53 +10:00
pci_64.c [POWERPC] Fix pci domain detection 2007-10-03 11:48:44 +10:00
pci_dn.c [POWERPC] Fix section mismatch in PCI code 2007-09-19 15:25:34 +10:00
pmc.c [POWERPC] Fix typo: MMCR0_PMA0 != MMCR0_PMAO 2007-05-22 20:20:56 +10:00
ppc32.h
ppc_ksyms.c [POWERPC] Fix build errors when BLOCK=n 2007-09-22 14:49:22 +10:00
proc_ppc64.c [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
process.c Merge branch 'linux-2.6' into for-2.6.24 2007-10-03 15:33:17 +10:00
prom.c [POWERPC] Use cache-inhibited large page bit from firmware 2007-10-09 21:00:48 +10:00
prom_init.c [POWERPC] prom_init whitespace cleanup, typo fix 2007-09-14 01:33:24 +10:00
prom_parse.c Revert "[POWERPC] Don't complain if size-cells == 0 in prom_parse()" 2007-07-26 13:44:36 +10:00
ptrace.c [POWERPC] Add CHECK_FULL_REGS in several places in ptrace code 2007-10-03 11:48:43 +10:00
ptrace32.c [POWERPC] Add CHECK_FULL_REGS in several places in ptrace code 2007-10-03 11:48:43 +10:00
rtas-proc.c [POWERPC] Fix ppc_rtas_progress_show() 2007-05-17 21:11:15 +10:00
rtas-rtc.c [PATCH] powerpc: reorg RTAS delay code 2006-06-09 21:21:06 +10:00
rtas.c [POWERPC] Remove old interface find_path_device 2007-04-24 22:08:59 +10:00
rtas_flash.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
rtas_pci.c [POWERPC] rtas_pci_ops: Use named structure member initializers 2007-08-17 11:01:53 +10:00
semaphore.c
setup-common.c [POWERPC] Remove cmd_line from head*.S 2007-09-19 15:25:34 +10:00
setup.h [PATCH] powerpc: Make early xmon logic immune to location of early parsing 2006-05-19 15:02:12 +10:00
setup_32.c [POWERPC] Only call ppc_md.setup_arch() if it is provided 2007-10-11 20:39:36 +10:00
setup_64.c [POWERPC] Only call ppc_md.setup_arch() if it is provided 2007-10-11 20:39:36 +10:00
signal.c [POWERPC] Less ifdef's in signal.c/signal.h 2007-06-14 22:29:58 +10:00
signal.h [POWERPC] Less ifdef's in signal.c/signal.h 2007-06-14 22:29:58 +10:00
signal_32.c [POWERPC] Merge creation of signal frame 2007-06-14 22:29:58 +10:00
signal_64.c Merge branch 'for-2.6.23' into merge 2007-07-11 13:28:26 +10:00
smp-tbsync.c [POWERPC] Replace kmalloc+memset with kzalloc 2006-12-04 20:42:09 +11:00
smp.c [POWERPC] Implement clockevents driver for powerpc 2007-10-03 15:44:34 +10:00
softemu8xx.c [POWERPC] 8xx: Move softemu8xx.c from arch/ppc 2007-10-04 11:02:54 -05:00
suspend.c [PATCH] x86: Move swsusp __pa() dependent code to arch portion 2007-05-02 19:27:07 +02:00
swsusp.c powerpc: fixup hard_irq_disable semantics 2007-05-11 08:29:34 -07:00
swsusp_32.S [PATCH] Change the name of pagedir_nosave 2006-09-26 08:49:01 -07:00
swsusp_64.c [POWERPC] powermac: Suspend to disk on G5 2007-05-07 20:31:14 +10:00
swsusp_asm64.S [POWERPC] powermac: Suspend to disk on G5 2007-05-07 20:31:14 +10:00
sys_ppc32.c sys_fallocate() implementation on i386, x86_64 and powerpc 2007-07-17 21:42:44 -04:00
syscalls.c Remove fs.h from mm.h 2007-07-29 17:09:29 -07:00
sysfs.c [POWERPC] Remove warning in arch/powerpc/kernel/sysfs.c 2007-09-14 01:33:22 +10:00
systbl.S [POWERPC] Align the sys_call_table 2007-10-11 14:36:47 +10:00
tau_6xx.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
time.c [POWERPC] Implement clockevents driver for powerpc 2007-10-03 15:44:34 +10:00
traps.c [POWERPC] 8xx: Move softemu8xx.c from arch/ppc 2007-10-04 11:02:54 -05:00
udbg.c [POWERPC] Add early debug console for CPM serial ports. 2007-10-03 20:35:43 -05:00
udbg_16550.c [POWERPC] 4xx: Implement udbg_getc() for 440 2007-09-19 21:13:17 -05:00
vdso.c [POWERPC] Disable vDSO support for ARCH=ppc where it's not implemented 2007-10-11 20:25:25 +10:00
vecemu.c
vector.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vio.c [POWERPC] iSeries: Move detection of virtual cdroms 2007-10-11 20:40:47 +10:00
vmlinux.lds.S [POWERPC] Fix modpost warnings from head*.S on ppc32 2007-09-14 08:53:36 -05:00