[Cbe-oss-dev] [PATCH 9/9] spufs: change decrementer restore timing
Masato Noguchi
Masato.Noguchi at jp.sony.com
Fri Jul 13 17:49:23 EST 2007
SPU decrementer should be restored after waiting LSCSA CMA completion.
Signed-off-by: Masato Noguchi <Masato.Noguchi at jp.sony.com>
---
arch/powerpc/platforms/cell/spufs/spu_restore.c | 4 -
arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped | 36 +++++------
2 files changed, 20 insertions(+), 20 deletions(-)
Index: linux-2.6/arch/powerpc/platforms/cell/spufs/spu_restore.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/spu_restore.c
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/spu_restore.c
@@ -84,7 +84,7 @@ static inline void restore_decr(void)
unsigned int decr_running;
unsigned int decr;
- /* Restore, Step 6:
+ /* Restore, Step 6(moved):
* If the LSCSA "decrementer running" flag is set
* then write the SPU_WrDec channel with the
* decrementer value from LSCSA.
@@ -318,10 +318,10 @@ int main()
build_dma_list(lscsa_ea); /* Step 3. */
restore_upper_240kb(lscsa_ea); /* Step 4. */
/* Step 5: done by 'exit'. */
- restore_decr(); /* Step 6. */
enqueue_putllc(lscsa_ea); /* Step 7. */
set_tag_update(); /* Step 8. */
read_tag_status(); /* Step 9. */
+ restore_decr(); /* moved Step 6. */
read_llar_status(); /* Step 10. */
write_ppu_mb(); /* Step 11. */
write_ppuint_mb(); /* Step 12. */
Index: linux-2.6/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped
@@ -93,26 +93,21 @@ static unsigned int spu_restore_code[]
0x18020204,
0x24000282,
0x217ffa09,
-0x04000403,
-0x21a00803,
-0x3fbe0502,
-0x3fe30102,
-0x04000105,
-0x21a00885,
+0x04000402,
+0x21a00802,
+0x3fbe0504,
+0x3fe30204,
+0x21a00884,
0x42074002,
0x21a00902,
0x40803c03,
0x21a00983,
-0x04000484,
-0x21a00a04,
+0x04000485,
+0x21a00a05,
0x40802202,
0x21a00a82,
-0x30809c03,
-0x34000182,
-0x14004102,
-0x21002782,
-0x21a00804,
-0x21a00885,
+0x21a00805,
+0x21a00884,
0x3fbf0582,
0x3f200102,
0x3fbe0102,
@@ -120,13 +115,17 @@ static unsigned int spu_restore_code[]
0x21a00902,
0x40804003,
0x21a00983,
-0x21a00a04,
+0x21a00a05,
0x40805a02,
0x21a00a82,
0x40800083,
0x21a00b83,
0x01a00c02,
-0x01a00d84,
+0x30809c03,
+0x34000182,
+0x14004102,
+0x21002082,
+0x01a00d82,
0x3080a003,
0x34000182,
0x21a00e02,
@@ -145,9 +144,10 @@ static unsigned int spu_restore_code[]
0x3080aa03,
0x34000182,
0x21a00b02,
+0x4020007f,
0x3080ae02,
-0x3080ac04,
0x42004805,
+0x3080ac04,
0x34000103,
0x34000202,
0x1cffc183,
@@ -193,7 +193,7 @@ static unsigned int spu_restore_code[]
0x34000182,
0x21a00382,
0x4020007f,
-0x327fd700,
+0x327fde00,
0x409ffe02,
0x30801203,
0x40800206,
More information about the cbe-oss-dev
mailing list