From 8b94bfe7cf8a154cdaf0f14562dbf17dabbbaebf Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 22 Feb 2012 13:50:13 +0000 Subject: [PATCH] --- yaml --- r: 292477 b: refs/heads/master c: fe83364f0bf11fcb20cecbe944a95834632ffffb h: refs/heads/master i: 292475: 7a72b4b13b60c9e144f1aa3a8076295a1b0e5a45 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/sysdev/mpic.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8fb1dd9a5b81..107440631843 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f851013cb2238a82782da03ac82a14447933f90d +refs/heads/master: fe83364f0bf11fcb20cecbe944a95834632ffffb diff --git a/trunk/arch/powerpc/sysdev/mpic.c b/trunk/arch/powerpc/sysdev/mpic.c index b9b989d305dd..16eb743b38a7 100644 --- a/trunk/arch/powerpc/sysdev/mpic.c +++ b/trunk/arch/powerpc/sysdev/mpic.c @@ -1331,9 +1331,13 @@ struct mpic * __init mpic_alloc(struct device_node *node, /* * By default, the last source number comes from the MPIC, but the * device-tree and board support code can override it on buggy hw. + * If we get passed an isu_size (multi-isu MPIC) then we use that + * as a default instead of the value read from the HW. */ last_irq = (greg_feature & MPIC_GREG_FEATURE_LAST_SRC_MASK) - >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT; + >> MPIC_GREG_FEATURE_LAST_SRC_SHIFT; + if (isu_size) + last_irq = isu_size * MPIC_MAX_ISU - 1; of_property_read_u32(mpic->node, "last-interrupt-source", &last_irq); if (irq_count) last_irq = irq_count - 1; @@ -1352,7 +1356,7 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->isu_mask = (1 << mpic->isu_shift) - 1; mpic->irqhost = irq_alloc_host(mpic->node, IRQ_HOST_MAP_LINEAR, - mpic->isu_size, &mpic_host_ops, + last_irq + 1, &mpic_host_ops, intvec_top + 1); /*