diff options
| author | Masato Noguchi <Masato.Noguchi@jp.sony.com> | 2007-07-20 15:39:37 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-07-20 15:41:55 -0400 |
| commit | 1cfc0f86eb0348dd04ace8c2171642ebe9cd87bb (patch) | |
| tree | 4d7d4de86d020eab3c00975117f8e2b4745f995b | |
| parent | cfd529b25d9b1d48423b85d76066348e2459e646 (diff) | |
[CELL] spufs: fix decr_status meanings
The decr_status in the LSCSA is confusedly used as two meanings:
* SPU decrementer was running
* SPU decrementer was wrapped as a result of adjust
and the code to set decr_status is missing.
This patch fixes these problems by using the decr_status argument as a
set of flags. This requires a rebuild of the shipped spu_restore code.
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>
| -rw-r--r-- | arch/powerpc/platforms/cell/spufs/spu_restore.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped | 470 | ||||
| -rw-r--r-- | arch/powerpc/platforms/cell/spufs/switch.c | 12 | ||||
| -rw-r--r-- | include/asm-powerpc/spu_csa.h | 8 |
4 files changed, 269 insertions, 223 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore.c b/arch/powerpc/platforms/cell/spufs/spu_restore.c index 4e19ed7a0756..7114e033460e 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_restore.c +++ b/arch/powerpc/platforms/cell/spufs/spu_restore.c | |||
| @@ -90,7 +90,7 @@ static inline void restore_decr(void) | |||
| 90 | * decrementer value from LSCSA. | 90 | * decrementer value from LSCSA. |
| 91 | */ | 91 | */ |
| 92 | offset = LSCSA_QW_OFFSET(decr_status); | 92 | offset = LSCSA_QW_OFFSET(decr_status); |
| 93 | decr_running = regs_spill[offset].slot[0]; | 93 | decr_running = regs_spill[offset].slot[0] & SPU_DECR_STATUS_RUNNING; |
| 94 | if (decr_running) { | 94 | if (decr_running) { |
| 95 | offset = LSCSA_QW_OFFSET(decr); | 95 | offset = LSCSA_QW_OFFSET(decr); |
| 96 | decr = regs_spill[offset].slot[0]; | 96 | decr = regs_spill[offset].slot[0]; |
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped index 15183d209b58..799815e22377 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped +++ b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped | |||
| @@ -10,7 +10,7 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
| 10 | 0x24fd8081, | 10 | 0x24fd8081, |
| 11 | 0x1cd80081, | 11 | 0x1cd80081, |
| 12 | 0x33001180, | 12 | 0x33001180, |
| 13 | 0x42030003, | 13 | 0x42034003, |
| 14 | 0x33800284, | 14 | 0x33800284, |
| 15 | 0x1c010204, | 15 | 0x1c010204, |
| 16 | 0x40200000, | 16 | 0x40200000, |
| @@ -24,22 +24,22 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
| 24 | 0x23fffd84, | 24 | 0x23fffd84, |
| 25 | 0x1c100183, | 25 | 0x1c100183, |
| 26 | 0x217ffa85, | 26 | 0x217ffa85, |
| 27 | 0x3080a000, | 27 | 0x3080b000, |
| 28 | 0x3080a201, | 28 | 0x3080b201, |
| 29 | 0x3080a402, | 29 | 0x3080b402, |
| 30 | 0x3080a603, | 30 | 0x3080b603, |
| 31 | 0x3080a804, | 31 | 0x3080b804, |
| 32 | 0x3080aa05, | 32 | 0x3080ba05, |
| 33 | 0x3080ac06, | 33 | 0x3080bc06, |
| 34 | 0x3080ae07, | 34 | 0x3080be07, |
| 35 | 0x3080b008, | 35 | 0x3080c008, |
| 36 | 0x3080b209, | 36 | 0x3080c209, |
| 37 | 0x3080b40a, | 37 | 0x3080c40a, |
| 38 | 0x3080b60b, | 38 | 0x3080c60b, |
| 39 | 0x3080b80c, | 39 | 0x3080c80c, |
| 40 | 0x3080ba0d, | 40 | 0x3080ca0d, |
| 41 | 0x3080bc0e, | 41 | 0x3080cc0e, |
| 42 | 0x3080be0f, | 42 | 0x3080ce0f, |
| 43 | 0x00003ffc, | 43 | 0x00003ffc, |
| 44 | 0x00000000, | 44 | 0x00000000, |
| 45 | 0x00000000, | 45 | 0x00000000, |
| @@ -48,19 +48,18 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
| 48 | 0x3ec00083, | 48 | 0x3ec00083, |
| 49 | 0xb0a14103, | 49 | 0xb0a14103, |
| 50 | 0x01a00204, | 50 | 0x01a00204, |
| 51 | 0x3ec10082, | 51 | 0x3ec10083, |
| 52 | 0x4202800e, | 52 | 0x4202c002, |
| 53 | 0x04000703, | 53 | 0xb0a14203, |
| 54 | 0xb0a14202, | 54 | 0x21a00802, |
| 55 | 0x21a00803, | 55 | 0x3fbf028a, |
| 56 | 0x3fbf028d, | 56 | 0x3f20050a, |
| 57 | 0x3f20068d, | 57 | 0x3fbe0502, |
| 58 | 0x3fbe0682, | ||
| 59 | 0x3fe30102, | 58 | 0x3fe30102, |
| 60 | 0x21a00882, | 59 | 0x21a00882, |
| 61 | 0x3f82028f, | 60 | 0x3f82028b, |
| 62 | 0x3fe3078f, | 61 | 0x3fe3058b, |
| 63 | 0x3fbf0784, | 62 | 0x3fbf0584, |
| 64 | 0x3f200204, | 63 | 0x3f200204, |
| 65 | 0x3fbe0204, | 64 | 0x3fbe0204, |
| 66 | 0x3fe30204, | 65 | 0x3fe30204, |
| @@ -75,52 +74,46 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
| 75 | 0x21a00083, | 74 | 0x21a00083, |
| 76 | 0x40800082, | 75 | 0x40800082, |
| 77 | 0x21a00b02, | 76 | 0x21a00b02, |
| 78 | 0x10002818, | 77 | 0x10002612, |
| 79 | 0x42a00002, | 78 | 0x42a00003, |
| 80 | 0x32800007, | 79 | 0x42074006, |
| 81 | 0x4207000c, | 80 | 0x1800c204, |
| 82 | 0x18008208, | 81 | 0x40a00008, |
| 83 | 0x40a0000b, | 82 | 0x40800789, |
| 84 | 0x4080020a, | 83 | 0x1c010305, |
| 85 | 0x40800709, | 84 | 0x34000302, |
| 86 | 0x00200000, | ||
| 87 | 0x42070002, | ||
| 88 | 0x3ac30384, | ||
| 89 | 0x1cffc489, | 85 | 0x1cffc489, |
| 90 | 0x00200000, | 86 | 0x3ec00303, |
| 91 | 0x18008383, | 87 | 0x3ec00287, |
| 92 | 0x38830382, | 88 | 0xb0408403, |
| 93 | 0x4cffc486, | 89 | 0x24000302, |
| 94 | 0x3ac28185, | 90 | 0x34000282, |
| 95 | 0xb0408584, | 91 | 0x1c020306, |
| 96 | 0x28830382, | 92 | 0xb0408207, |
| 97 | 0x1c020387, | 93 | 0x18020204, |
| 98 | 0x38828182, | 94 | 0x24000282, |
| 99 | 0xb0408405, | 95 | 0x217ffa09, |
| 100 | 0x1802c408, | 96 | 0x04000403, |
| 101 | 0x28828182, | ||
| 102 | 0x217ff886, | ||
| 103 | 0x04000583, | ||
| 104 | 0x21a00803, | 97 | 0x21a00803, |
| 105 | 0x3fbe0682, | 98 | 0x3fbe0502, |
| 106 | 0x3fe30102, | 99 | 0x3fe30102, |
| 107 | 0x04000106, | 100 | 0x04000105, |
| 108 | 0x21a00886, | 101 | 0x21a00885, |
| 109 | 0x04000603, | 102 | 0x42074002, |
| 110 | 0x21a00903, | 103 | 0x21a00902, |
| 111 | 0x40803c02, | 104 | 0x40803c03, |
| 112 | 0x21a00982, | 105 | 0x21a00983, |
| 113 | 0x40800003, | 106 | 0x04000484, |
| 114 | 0x04000184, | ||
| 115 | 0x21a00a04, | 107 | 0x21a00a04, |
| 116 | 0x40802202, | 108 | 0x40802202, |
| 117 | 0x21a00a82, | 109 | 0x21a00a82, |
| 118 | 0x42028005, | 110 | 0x30809c03, |
| 119 | 0x34208702, | 111 | 0x34000182, |
| 120 | 0x21002282, | 112 | 0x14004102, |
| 113 | 0x21002782, | ||
| 121 | 0x21a00804, | 114 | 0x21a00804, |
| 122 | 0x21a00886, | 115 | 0x21a00885, |
| 123 | 0x3fbf0782, | 116 | 0x3fbf0582, |
| 124 | 0x3f200102, | 117 | 0x3f200102, |
| 125 | 0x3fbe0102, | 118 | 0x3fbe0102, |
| 126 | 0x3fe30102, | 119 | 0x3fe30102, |
| @@ -133,194 +126,233 @@ static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { | |||
| 133 | 0x40800083, | 126 | 0x40800083, |
| 134 | 0x21a00b83, | 127 | 0x21a |
