[CELL] spufs: change decrementer restore timing
authorMasato Noguchi <Masato.Noguchi@jp.sony.com>
Fri, 20 Jul 2007 19:39:41 +0000 (21:39 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Fri, 20 Jul 2007 19:42:03 +0000 (21:42 +0200)
The SPU decrementer should be restored after the LSCSA DMA has
completed.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
arch/powerpc/platforms/cell/spufs/spu_restore.c
arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped

index 7114e033460ea20ca4576d43b19ac4796dfb3fd9..21a9c952d88b4435edbb820a0a98790b1489e058 100644 (file)
@@ -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 799815e22377dbc169f8a9fd3a9e9314517a60a4..f383b027e8bfd734d78d819c9012252e17dcc34e 100644 (file)
@@ -93,26 +93,21 @@ static unsigned int spu_restore_code[]  __attribute__((__aligned__(128))) = {
 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[]  __attribute__((__aligned__(128))) = {
 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[]  __attribute__((__aligned__(128))) = {
 0x3080aa03,
 0x34000182,
 0x21a00b02,
+0x4020007f,
 0x3080ae02,
-0x3080ac04,
 0x42004805,
+0x3080ac04,
 0x34000103,
 0x34000202,
 0x1cffc183,
@@ -193,7 +193,7 @@ static unsigned int spu_restore_code[]  __attribute__((__aligned__(128))) = {
 0x34000182,
 0x21a00382,
 0x4020007f,
-0x327fd700,
+0x327fde00,
 0x409ffe02,
 0x30801203,
 0x40800206,