diff options
author | Robert Richter <robert.richter@amd.com> | 2009-07-10 09:47:17 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-07-20 10:43:21 -0400 |
commit | 61d149d5248ad7428801cdede0f5fcc2b90cd61c (patch) | |
tree | 7cfc04e6567cf34f2cba40f86287a51566d163ad /arch/x86/oprofile/op_model_amd.c | |
parent | 1b294f5960cd89e49eeb3e797860c552b03f2272 (diff) |
x86/oprofile: Implement op_x86_virt_to_phys()
This patch implements a common x86 function to convert virtual counter
numbers to physical.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/op_model_amd.c')
-rw-r--r-- | arch/x86/oprofile/op_model_amd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index dce69b5979e6..1ea19829d985 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c | |||
@@ -81,7 +81,7 @@ static void op_mux_fill_in_addresses(struct op_msrs * const msrs) | |||
81 | int i; | 81 | int i; |
82 | 82 | ||
83 | for (i = 0; i < NUM_VIRT_COUNTERS; i++) { | 83 | for (i = 0; i < NUM_VIRT_COUNTERS; i++) { |
84 | int hw_counter = i % NUM_COUNTERS; | 84 | int hw_counter = op_x86_virt_to_phys(i); |
85 | if (reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i)) | 85 | if (reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i)) |
86 | msrs->multiplex[i].addr = MSR_K7_PERFCTR0 + hw_counter; | 86 | msrs->multiplex[i].addr = MSR_K7_PERFCTR0 + hw_counter; |
87 | else | 87 | else |