[patch 1/6] PS3: Fix lpm set bookmark

Geoff Levand geoffrey.levand at am.sony.com
Sat Feb 9 09:52:30 EST 2008


From: Takashi Yamamoto <TakashiA.Yamamoto at jp.sony.com>

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 at jp.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>
---
 drivers/ps3/ps3-lpm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/ps3/ps3-lpm.c
+++ b/drivers/ps3/ps3-lpm.c
@@ -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);
 

-- 






More information about the Linuxppc-dev mailing list