linux/arch/powerpc
Paul Mackerras 6984efb692 perf_counter: powerpc: Fix event alternative code generation on POWER5/5+
Commit ef923214 ("perf_counter: powerpc: use u64 for event
codes internally") introduced a bug where the return value from
function find_alternative_bdecode gets put into a u64 variable
and later tested to see if it is < 0.  The effect is that we
get extra, bogus event code alternatives on POWER5 and POWER5+,
leading to error messages such as "oops compute_mmcr failed"
being printed and counters not counting properly.

This fixes it by using s64 for the return type of
find_alternative_bdecode and for the local variable that the
caller puts the value in.  It also makes the event argument a
u64 on POWER5+ for consistency.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
Cc: Stephane Eranian <eranian@googlemail.com>
LKML-Reference: <18982.17586.666132.90983@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-06-03 11:49:52 +02:00
..
boot Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-05-15 08:05:02 -07:00
configs powerpc/ps3: Update ps3_defconfig 2009-05-18 15:19:05 +10:00
include/asm Merge branch 'linus' into perfcounters/core 2009-06-01 10:01:39 +02:00
kernel perf_counter: powerpc: Fix event alternative code generation on POWER5/5+ 2009-06-03 11:49:52 +02:00
kvm KVM: ppc: e500: Fix the bug that KVM is unstable in SMP 2009-03-24 11:03:15 +02:00
lib powerpc: Move dma-noncoherent.c from arch/powerpc/lib to arch/powerpc/mm 2009-05-27 16:32:05 +10:00
math-emu
mm Merge branch 'linus' into perfcounters/core 2009-06-01 10:01:39 +02:00
oprofile powerpc: Fix oprofile sampling of marked events on POWER7 2009-05-15 16:43:41 +10:00
platforms Merge branch 'linus' into perfcounters/core 2009-06-01 10:01:39 +02:00
sysdev powerpc/mpic: Fix incorrect allocation of interrupt rev-map 2009-05-15 16:43:41 +10:00
xmon
Kconfig powerpc: Fix up dma_alloc_coherent() on platforms without cache coherency. 2009-05-27 16:33:59 +10:00
Kconfig.debug generic debug pagealloc: build fix 2009-04-02 19:04:48 -07:00
Makefile