[linux-yocto] [PATCH 56/70] powerpc/mpic: Create a revmap with enough entries for IPIs and timers

Paul Butler butler.paul at gmail.com
Mon Jun 10 18:46:19 PDT 2013


From: Benjamin Herrenschmidt <benh at kernel.crashing.org>

upstream commit: 574ce79cea9d3fda109ffcc82f81733de4740e5c

The current mpic code creates a linear revmap just big enough for all
the sources, which happens to miss the IPIs and timers on some machines.

This will in turn break when the irqdomain code loses the fallback of
doing a linear search when the revmap fails (and really slows down IPIs
otherwise).

This happens for example on the U4 based Apple machines such as the
dual core PowerMac G5s.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
[Yongli: Change the 'intvec_top' to 'intvec_top + 1' since we need pass
the irq count to function irq_domain_add_linear.]
Signed-off-by: Yongli He <yongli.he at windriver.com>
---
 arch/powerpc/sysdev/mpic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 395af13..9ee7043 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1376,7 +1376,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
 	mpic->isu_mask = (1 << mpic->isu_shift) - 1;
 
 	mpic->irqhost = irq_domain_add_linear(mpic->node,
-				       last_irq + 1,
+				       intvec_top + 1,
 				       &mpic_host_ops, mpic);
 
 	/*
-- 
1.8.3




More information about the linux-yocto mailing list