2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-19 16:14:13 +08:00

[POWERPC] PS3: Fix setting bookmark in logical performance monitor

Fix the ps3_set_bookmark() routine of the PS3 logical performance
monitor driver.

To properly set a performance monitor bookmark the Cell processor
requires no instruction branches near the setting of the bookmark
SPR.  Testing showed that the use of the db10cyc instruction did
not work correctly.  This change replaces the db10cyc instruction
with 10 nop instructions.

Signed-off-by: Takashi Yamamoto <TakashiA.Yamamoto@jp.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Takashi Yamamoto 2008-02-09 09:52:30 +11:00 committed by Paul Mackerras
parent 79ccd1bedc
commit a7faa8dc95

View File

@ -181,9 +181,9 @@ void ps3_set_bookmark(u64 bookmark)
* includes cycles before the call.
*/
asm volatile("or 29, 29, 29;"); /* db10cyc */
asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;");
mtspr(SPRN_BKMK, bookmark);
asm volatile("or 29, 29, 29;"); /* db10cyc */
asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;");
}
EXPORT_SYMBOL_GPL(ps3_set_bookmark);