diff options
author | Olof Johansson <olof@lixom.net> | 2007-01-28 22:23:14 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-06 22:03:19 -0500 |
commit | c69b767a2c871bb80cb9e346d6ebce248f711dfb (patch) | |
tree | b37d34c847f60383b4ada1ba36a71be8ffa17f62 /arch/powerpc/oprofile/op_model_power4.c | |
parent | 4942bd80e83d13bf394df4a8109bee39d861820f (diff) |
[POWERPC] Oprofile cleanup
Clean up the ctr_read/write a bit. It's currently defined in the
include but only used in one C file each. The only exception is the
classic version, so keep that in the include and define in the C file
as appropriate.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/oprofile/op_model_power4.c')
-rw-r--r-- | arch/powerpc/oprofile/op_model_power4.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 356709d515b9..fe597a154d4f 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -121,9 +121,9 @@ static void power4_start(struct op_counter_config *ctr) | |||
121 | 121 | ||
122 | for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { | 122 | for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { |
123 | if (ctr[i].enabled) { | 123 | if (ctr[i].enabled) { |
124 | ctr_write(i, reset_value[i]); | 124 | classic_ctr_write(i, reset_value[i]); |
125 | } else { | 125 | } else { |
126 | ctr_write(i, 0); | 126 | classic_ctr_write(i, 0); |
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
@@ -254,13 +254,13 @@ static void power4_handle_interrupt(struct pt_regs *regs, | |||
254 | mtmsrd(mfmsr() | MSR_PMM); | 254 | mtmsrd(mfmsr() | MSR_PMM); |
255 | 255 | ||
256 | for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { | 256 | for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { |
257 | val = ctr_read(i); | 257 | val = classic_ctr_read(i); |
258 | if (val < 0) { | 258 | if (val < 0) { |
259 | if (oprofile_running && ctr[i].enabled) { | 259 | if (oprofile_running && ctr[i].enabled) { |
260 | oprofile_add_ext_sample(pc, regs, i, is_kernel); | 260 | oprofile_add_ext_sample(pc, regs, i, is_kernel); |
261 | ctr_write(i, reset_value[i]); | 261 | classic_ctr_write(i, reset_value[i]); |
262 | } else { | 262 | } else { |
263 | ctr_write(i, 0); | 263 | classic_ctr_write(i, 0); |
264 | } | 264 | } |
265 | } | 265 | } |
266 | } | 266 | } |