diff options
author | Carl Love <carll@us.ibm.com> | 2007-02-13 16:02:02 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-02-13 16:03:06 -0500 |
commit | bcb63e25ed3c56ee40cca4d18fbaac1d2a40c1d6 (patch) | |
tree | d82fcdbfa5b262747e0b9548d526305a3fe0d8a0 /arch/powerpc/platforms | |
parent | 128b8546a83a9e37448bc126e1045dc1db291165 (diff) |
[POWERPC] cell: PPU Oprofile cleanup patch
This is a clean up patch that includes the following changes:
-Some comments were added to clarify the code based on feedback
from the community.
-The write_pm_cntrl() and set_count_mode() were passed a
structure element from a global variable. The argument was
removed so the functions now just operate on the global directly.
-The set_pm_event() function call in the cell_virtual_cntr()
routine was moved to a for-loop before the for_each_cpu loop
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/pmu.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c index d04ae1671e6c..66ca4b5a1dbc 100644 --- a/arch/powerpc/platforms/cell/pmu.c +++ b/arch/powerpc/platforms/cell/pmu.c | |||
@@ -345,18 +345,12 @@ EXPORT_SYMBOL_GPL(cbe_read_trace_buffer); | |||
345 | * Enabling/disabling interrupts for the entire performance monitoring unit. | 345 | * Enabling/disabling interrupts for the entire performance monitoring unit. |
346 | */ | 346 | */ |
347 | 347 | ||
348 | u32 cbe_query_pm_interrupts(u32 cpu) | 348 | u32 cbe_get_and_clear_pm_interrupts(u32 cpu) |
349 | { | ||
350 | return cbe_read_pm(cpu, pm_status); | ||
351 | } | ||
352 | EXPORT_SYMBOL_GPL(cbe_query_pm_interrupts); | ||
353 | |||
354 | u32 cbe_clear_pm_interrupts(u32 cpu) | ||
355 | { | 349 | { |
356 | /* Reading pm_status clears the interrupt bits. */ | 350 | /* Reading pm_status clears the interrupt bits. */ |
357 | return cbe_query_pm_interrupts(cpu); | 351 | return cbe_read_pm(cpu, pm_status); |
358 | } | 352 | } |
359 | EXPORT_SYMBOL_GPL(cbe_clear_pm_interrupts); | 353 | EXPORT_SYMBOL_GPL(cbe_get_and_clear_pm_interrupts); |
360 | 354 | ||
361 | void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask) | 355 | void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask) |
362 | { | 356 | { |
@@ -371,7 +365,7 @@ EXPORT_SYMBOL_GPL(cbe_enable_pm_interrupts); | |||
371 | 365 | ||
372 | void cbe_disable_pm_interrupts(u32 cpu) | 366 | void cbe_disable_pm_interrupts(u32 cpu) |
373 | { | 367 | { |
374 | cbe_clear_pm_interrupts(cpu); | 368 | cbe_get_and_clear_pm_interrupts(cpu); |
375 | cbe_write_pm(cpu, pm_status, 0); | 369 | cbe_write_pm(cpu, pm_status, 0); |
376 | } | 370 | } |
377 | EXPORT_SYMBOL_GPL(cbe_disable_pm_interrupts); | 371 | EXPORT_SYMBOL_GPL(cbe_disable_pm_interrupts); |