Commit a7faa8dc95ef90593d605d36409ef9100bdd11f8

Authored by Takashi Yamamoto
Committed by Paul Mackerras
1 parent 79ccd1bedc

[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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/ps3/ps3-lpm.c
... ... @@ -181,9 +181,9 @@
181 181 * includes cycles before the call.
182 182 */
183 183  
184   - asm volatile("or 29, 29, 29;"); /* db10cyc */
  184 + asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;");
185 185 mtspr(SPRN_BKMK, bookmark);
186   - asm volatile("or 29, 29, 29;"); /* db10cyc */
  186 + asm volatile("nop;nop;nop;nop;nop;nop;nop;nop;nop;");
187 187 }
188 188 EXPORT_SYMBOL_GPL(ps3_set_bookmark);
189 189