From: Robert Richter Date: Fri, 15 Jun 2012 17:06:44 +0000 (+0200) Subject: perf/x86/amd: Fix RDPMC index calculation for AMD family 15h X-Git-Tag: v3.6-rc1~167^2~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76958a61e42fb6277a8431eb17e4bdb24176f1b7;p=pandora-kernel.git perf/x86/amd: Fix RDPMC index calculation for AMD family 15h The RDPMC index calculation is wrong for AMD family 15h (X86_FEATURE_ PERFCTR_CORE set). This leads to a #GP when accessing the counter: Pid: 2237, comm: syslog-ng Not tainted 3.5.0-rc1-perf-x86_64-standard-g130ff90 #135 AMD Pike/Pike RIP: 0010:[] [] x86_perf_event_update+0x27/0x66 While the msr address offset is (index << 1) we must use index to select the correct rdpmc. Signed-off-by: Robert Richter Acked-by: Peter Zijlstra Cc: Vince Weaver Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed