diff options
author | Robert Richter <robert.richter@amd.com> | 2009-06-03 13:09:27 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-06-11 14:12:57 -0400 |
commit | 95e74e62c1540b1115fe8cec5b592f22960f2bb2 (patch) | |
tree | c9f821446c4e50642b29cf0618168ba839ff7735 /arch/x86/oprofile/nmi_int.c | |
parent | bbc5986d2db427fdd61b6116ff8b9ed988e663a8 (diff) |
x86/oprofile: use 64 bit values to save MSR states
This patch removes struct op_saved_msr and replaces it by an u64
variable. This makes code easier and it is possible to use 64 bit MSR
functions.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/nmi_int.c')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 388ee15e0e42..3b84b789de0b 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -78,19 +78,13 @@ static void nmi_cpu_save_registers(struct op_msrs *msrs) | |||
78 | unsigned int i; | 78 | unsigned int i; |
79 | 79 | ||
80 | for (i = 0; i < nr_ctrs; ++i) { | 80 | for (i = 0; i < nr_ctrs; ++i) { |
81 | if (counters[i].addr) { | 81 | if (counters[i].addr) |
82 | rdmsr(counters[i].addr, | 82 | rdmsrl(counters[i].addr, counters[i].saved); |
83 | counters[i].saved.low, | ||
84 | counters[i].saved.high); | ||
85 | } | ||
86 | } | 83 | } |
87 | 84 | ||
88 | for (i = 0; i < nr_ctrls; ++i) { | 85 | for (i = 0; i < nr_ctrls; ++i) { |
89 | if (controls[i].addr) { | 86 | if (controls[i].addr) |
90 | rdmsr(controls[i].addr, | 87 | rdmsrl(controls[i].addr, controls[i].saved); |
91 | controls[i].saved.low, | ||
92 | controls[i].saved.high); | ||
93 | } | ||
94 | } | 88 | } |
95 | } | 89 | } |
96 | 90 | ||
@@ -204,19 +198,13 @@ static void nmi_restore_registers(struct op_msrs *msrs) | |||
204 | unsigned int i; | 198 | unsigned int i; |
205 | 199 | ||
206 | for (i = 0; i < nr_ctrls; ++i) { | 200 | for (i = 0; i < nr_ctrls; ++i) { |
207 | if (controls[i].addr) { | 201 | if (controls[i].addr) |
208 | wrmsr(controls[i].addr, | 202 | wrmsrl(controls[i].addr, controls[i].saved); |
209 | controls[i].saved.low, | ||
210 | controls[i].saved.high); | ||
211 | } | ||
212 | } | 203 | } |
213 | 204 | ||
214 | for (i = 0; i < nr_ctrs; ++i) { | 205 | for (i = 0; i < nr_ctrs; ++i) { |
215 | if (counters[i].addr) { | 206 | if (counters[i].addr) |
216 | wrmsr(counters[i].addr, | 207 | wrmsrl(counters[i].addr, counters[i].saved); |
217 | counters[i].saved.low, | ||
218 | counters[i].saved.high); | ||
219 | } | ||
220 | } | 208 | } |
221 | } | 209 | } |
222 | 210 | ||