powerpc/mpic: Fix irq distribution problem when MPIC_SINGLE_DEST_CPU
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. Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
2b3f8e87cf
commit
e242114aff
@@ -54,7 +54,7 @@ static DEFINE_RAW_SPINLOCK(mpic_lock);
|
|||||||
|
|
||||||
#ifdef CONFIG_PPC32 /* XXX for now */
|
#ifdef CONFIG_PPC32 /* XXX for now */
|
||||||
#ifdef CONFIG_IRQ_ALL_CPUS
|
#ifdef CONFIG_IRQ_ALL_CPUS
|
||||||
#define distribute_irqs (!(mpic->flags & MPIC_SINGLE_DEST_CPU))
|
#define distribute_irqs (1)
|
||||||
#else
|
#else
|
||||||
#define distribute_irqs (0)
|
#define distribute_irqs (0)
|
||||||
#endif
|
#endif
|
||||||
@@ -1703,7 +1703,7 @@ void mpic_setup_this_cpu(void)
|
|||||||
* it differently, then we should make sure we also change the default
|
* it differently, then we should make sure we also change the default
|
||||||
* values of irq_desc[].affinity in irq.c.
|
* values of irq_desc[].affinity in irq.c.
|
||||||
*/
|
*/
|
||||||
if (distribute_irqs) {
|
if (distribute_irqs && !(mpic->flags & MPIC_SINGLE_DEST_CPU)) {
|
||||||
for (i = 0; i < mpic->num_sources ; i++)
|
for (i = 0; i < mpic->num_sources ; i++)
|
||||||
mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
|
mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
|
||||||
mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) | msk);
|
mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) | msk);
|
||||||
|
|||||||
Reference in New Issue
Block a user