[080/205] perf, x86: Fix incorrect branches event on AMD CPUs

From: Greg KH
Date: Fri Jul 30 2010 - 14:26:22 EST

2.6.34-stable review patch. If anyone has any objections, please let us know.


From: Vince Weaver <vweaver1@xxxxxxxxxxxx>

commit f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2 upstream.

While doing some performance counter validation tests on some
assembly language programs I noticed that the "branches:u"
count was very wrong on AMD machines.

It looks like the wrong event was selected.

Signed-off-by: Vince Weaver <vweaver1@xxxxxxxxxxxx>
Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Robert Richter <robert.richter@xxxxxxx>
Cc: Borislav Petkov <borislav.petkov@xxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
LKML-Reference: <alpine.DEB.2.00.1007011526010.23160@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

arch/x86/kernel/cpu/perf_event_amd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/kernel/cpu/perf_event_amd.c
@@ -102,8 +102,8 @@ static const u64 amd_perfmon_event_map[]

static u64 amd_pmu_event_map(int hw_event)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/