For the mpic with a flag MPIC_SINGLE_DEST_CPU, only one bit should be set in interrupt destination registers. The code is applicable to 64-bit platforms as well as 32-bit.
Unified · Split
| @@ -54,7 +54,7 @@ static DEFINE_RAW_SPINLOCK(mpic_lock); · 53 unmodified lines | |||
| 54 | 54 | ||
| 55 | #ifdef CONFIG_PPC32 /* XXX for now */ | 55 | #ifdef CONFIG_PPC32 /* XXX for now */ |
| 56 | #ifdef CONFIG_IRQ_ALL_CPUS | 56 | #ifdef CONFIG_IRQ_ALL_CPUS |
| 57 | #define distribute_irqs (!(mpic->flags & MPIC_SINGLE_DEST_CPU)) | 57 | #define distribute_irqs (1) |
| 58 | #else | 58 | #else |
| 59 | #define distribute_irqs (0) | 59 | #define distribute_irqs (0) |
| 60 | #endif | 60 | #endif |
| @@ -1703,7 +1703,7 @@ void mpic_setup_this_cpu(void) · 1642 unmodified lines | |||
| 1703 | * it differently, then we should make sure we also change the default | 1703 | * it differently, then we should make sure we also change the default |
| 1704 | * values of irq_desc[].affinity in irq.c. | 1704 | * values of irq_desc[].affinity in irq.c. |
| 1705 | */ | 1705 | */ |
| 1706 | if (distribute_irqs) { | 1706 | if (distribute_irqs && !(mpic->flags & MPIC_SINGLE_DEST_CPU)) { |
| 1707 | for (i = 0; i < mpic->num_sources ; i++) | 1707 | for (i = 0; i < mpic->num_sources ; i++) |
| 1708 | mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), | 1708 | mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), |
| 1709 | mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) | msk); | 1709 | mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) | msk); |