diff options
Diffstat (limited to 'arch/mips/cavium-octeon/smp.c')
-rw-r--r-- | arch/mips/cavium-octeon/smp.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index ba78b21cc8d0..8b606423bbd7 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
@@ -37,13 +37,15 @@ static irqreturn_t mailbox_interrupt(int irq, void *dev_id) | |||
37 | uint64_t action; | 37 | uint64_t action; |
38 | 38 | ||
39 | /* Load the mailbox register to figure out what we're supposed to do */ | 39 | /* Load the mailbox register to figure out what we're supposed to do */ |
40 | action = cvmx_read_csr(CVMX_CIU_MBOX_CLRX(coreid)); | 40 | action = cvmx_read_csr(CVMX_CIU_MBOX_CLRX(coreid)) & 0xffff; |
41 | 41 | ||
42 | /* Clear the mailbox to clear the interrupt */ | 42 | /* Clear the mailbox to clear the interrupt */ |
43 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(coreid), action); | 43 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(coreid), action); |
44 | 44 | ||
45 | if (action & SMP_CALL_FUNCTION) | 45 | if (action & SMP_CALL_FUNCTION) |
46 | smp_call_function_interrupt(); | 46 | smp_call_function_interrupt(); |
47 | if (action & SMP_RESCHEDULE_YOURSELF) | ||
48 | scheduler_ipi(); | ||
47 | 49 | ||
48 | /* Check if we've been told to flush the icache */ | 50 | /* Check if we've been told to flush the icache */ |
49 | if (action & SMP_ICACHE_FLUSH) | 51 | if (action & SMP_ICACHE_FLUSH) |
@@ -200,16 +202,15 @@ void octeon_prepare_cpus(unsigned int max_cpus) | |||
200 | if (labi->labi_signature != LABI_SIGNATURE) | 202 | if (labi->labi_signature != LABI_SIGNATURE) |
201 | panic("The bootloader version on this board is incorrect."); | 203 | panic("The bootloader version on this board is incorrect."); |
202 | #endif | 204 | #endif |
203 | 205 | /* | |
204 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffffffff); | 206 | * Only the low order mailbox bits are used for IPIs, leave |
207 | * the other bits alone. | ||
208 | */ | ||
209 | cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff); | ||
205 | if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED, | 210 | if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED, |
206 | "mailbox0", mailbox_interrupt)) { | 211 | "SMP-IPI", mailbox_interrupt)) { |
207 | panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); | 212 | panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n"); |
208 | } | 213 | } |
209 | if (request_irq(OCTEON_IRQ_MBOX1, mailbox_interrupt, IRQF_DISABLED, | ||
210 | "mailbox1", mailbox_interrupt)) { | ||
211 | panic("Cannot request_irq(OCTEON_IRQ_MBOX1)\n"); | ||
212 | } | ||
213 | } | 214 | } |
214 | 215 | ||
215 | /** | 216 | /** |