projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d4036e
)
x86/oprofile: Fix usage of NUM_CONTROLS/NUM_COUNTERS macros
author
Robert Richter
<robert.richter@amd.com>
Wed, 8 Jul 2009 12:54:17 +0000
(14:54 +0200)
committer
Robert Richter
<robert.richter@amd.com>
Mon, 20 Jul 2009 14:43:18 +0000
(16:43 +0200)
Use the corresponding macros when iterating over counter and control
registers. Since NUM_CONTROLS and NUM_COUNTERS are equal for AMD cpus
the fix is more a cosmetical change.
Signed-off-by: Robert Richter <robert.richter@amd.com>
arch/x86/oprofile/op_model_amd.c
patch
|
blob
|
history
diff --git
a/arch/x86/oprofile/op_model_amd.c
b/arch/x86/oprofile/op_model_amd.c
index fdbed3a0c877404c56ba198e6822337051b63574..dcfd4505cacc59f02ff065f536abce40b69a5c71 100644
(file)
--- a/
arch/x86/oprofile/op_model_amd.c
+++ b/
arch/x86/oprofile/op_model_amd.c
@@
-99,7
+99,7
@@
static void op_amd_fill_in_addresses(struct op_msrs * const msrs)
#ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
for (i = 0; i < NUM_VIRT_COUNTERS; i++) {
- int hw_counter = i % NUM_CO
NTROL
S;
+ int hw_counter = i % NUM_CO
UNTER
S;
if (reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i))
msrs->multiplex[i].addr = MSR_K7_PERFCTR0 + hw_counter;
else
@@
-366,7
+366,7
@@
static void op_amd_shutdown(struct op_msrs const * const msrs)
if (msrs->counters[i].addr)
release_perfctr_nmi(MSR_K7_PERFCTR0 + i);
}
- for (i = 0; i < NUM_CO
UNTER
S; ++i) {
+ for (i = 0; i < NUM_CO
NTROL
S; ++i) {
if (msrs->controls[i].addr)
release_evntsel_nmi(MSR_K7_EVNTSEL0 + i);
}