]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] PS3: Fix setting bookmark in logical performance monitor
authorTakashi Yamamoto <TakashiA.Yamamoto@jp.sony.com>
Fri, 8 Feb 2008 22:52:30 +0000 (09:52 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 14 Feb 2008 11:11:00 +0000 (22:11 +1100)
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>
drivers/ps3/ps3-lpm.c

index 4c066545d176c8dd8d2126b49d67017224bf4f89..8a0b16bad8e94967dae9c08fe9554097d4b7ceb3 100644 (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);