diff options
| -rw-r--r-- | arch/powerpc/platforms/cell/interrupt.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 9d41e07b0c..e3fffdfcc6 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
| @@ -63,7 +63,24 @@ static DEFINE_PER_CPU(struct iic, iic); | |||
| 63 | 63 | ||
| 64 | void iic_local_enable(void) | 64 | void iic_local_enable(void) |
| 65 | { | 65 | { |
| 66 | out_be64(&__get_cpu_var(iic).regs->prio, 0xff); | 66 | struct iic *iic = &__get_cpu_var(iic); |
| 67 | u64 tmp; | ||
| 68 | |||
| 69 | /* | ||
| 70 | * There seems to be a bug that is present in DD2.x CPUs | ||
| 71 | * and still only partially fixed in DD3.1. | ||
| 72 | * This bug causes a value written to the priority register | ||
| 73 | * not to make it there, resulting in a system hang unless we | ||
| 74 | * write it again. | ||
| 75 | * Masking with 0xf0 is done because the Cell BE does not | ||
| 76 | * implement the lower four bits of the interrupt priority, | ||
| 77 | * they always read back as zeroes, although future CPUs | ||
| 78 | * might implement different bits. | ||
| 79 | */ | ||
| 80 | do { | ||
| 81 | out_be64(&iic->regs->prio, 0xff); | ||
| 82 | tmp = in_be64(&iic->regs->prio); | ||
| 83 | } while ((tmp & 0xf0) != 0xf0); | ||
| 67 | } | 84 | } |
| 68 | 85 | ||
| 69 | void iic_local_disable(void) | 86 | void iic_local_disable(void) |
