Commit 29641ce1 authored by Kevin Corry's avatar Kevin Corry Committed by Arnd Bergmann

[POWERPC] perfmon2: make pm_interval register read/write

The pm_interval register in the Cell PMU is read/write, but was implemented in
the kernel as write-only. Previously, the written value was saved in a "shadow"
copy so calls to cbe_read_pm() could return the value.

Perfmon2 needs to be able to read the current values of pm_interval, so change
cbe_read_pm() to read the actual register instead of the "shadow" copy. There
is currently no code in the kernel that tries to read the pm_interval register
with cbe_read_pm() (expecting to receive the "shadow" value), so this should
not break any existing code.
Signed-off-by: default avatarKevin Corry <kevcorry@us.ibm.com>
Signed-off-by: default avatarCarl Love <carll@us.ibm.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 7ee17466
...@@ -213,7 +213,7 @@ u32 cbe_read_pm(u32 cpu, enum pm_reg_name reg) ...@@ -213,7 +213,7 @@ u32 cbe_read_pm(u32 cpu, enum pm_reg_name reg)
break; break;
case pm_interval: case pm_interval:
READ_SHADOW_REG(val, pm_interval); READ_MMIO_UPPER32(val, pm_interval);
break; break;
case pm_start_stop: case pm_start_stop:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment