Skip to content

Commit

Permalink
[POWERPC] PS3: Fix setting bookmark in logical performance monitor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Yamamoto authored and paulusmack committed Feb 14, 2008
1 parent 79ccd1b commit a7faa8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ps3/ps3-lpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a7faa8d

Please sign in to comment.