From patchwork Thu Feb 3 01:51:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meador Inge X-Patchwork-Id: 81605 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 61446B7360 for ; Thu, 3 Feb 2011 12:51:55 +1100 (EST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "relay1.mentorg.com", Issuer "Entrust Certification Authority - L1B" (not verified)) by ozlabs.org (Postfix) with ESMTPS id C3A74B7112; Thu, 3 Feb 2011 12:51:48 +1100 (EST) Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1PkoMK-0002Hu-O3 from meador_inge@mentor.com ; Wed, 02 Feb 2011 17:51:44 -0800 Received: from na2-mail.mgc.mentorg.com ([134.86.114.213]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 2 Feb 2011 17:51:44 -0800 Received: from localhost.localdomain ([172.30.88.225]) by na2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 2 Feb 2011 18:51:43 -0700 From: Meador Inge To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 1/3] powerpc: Removing support for 'protected-sources' Date: Wed, 2 Feb 2011 19:51:38 -0600 Message-Id: <1296697900-14004-2-git-send-email-meador_inge@mentor.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1296697900-14004-1-git-send-email-meador_inge@mentor.com> References: <1296697900-14004-1-git-send-email-meador_inge@mentor.com> X-OriginalArrivalTime: 03 Feb 2011 01:51:43.0486 (UTC) FILETIME=[E86D49E0:01CBC344] Cc: devicetree-discuss@lists.ozlabs.org, Hollis Blanchard X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org In a recent discussion [1, 2] concerning device trees for AMP systems, the question of whether we really need 'protected-sources' arose. The general consensus was that if you don't want a source to be used, then it should *not* be mentioned in an 'interrupts' property. If a source really needs to be mentioned, then it should be put in a property other than 'interrupts' with a specific binding for that use case. [1] http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-January/004038.html [2] http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-January/003991.html Signed-off-by: Meador Inge CC: Hollis Blanchard CC: Benjamin Herrenschmidt --- arch/powerpc/include/asm/mpic.h | 3 --- arch/powerpc/sysdev/mpic.c | 38 -------------------------------------- 2 files changed, 0 insertions(+), 41 deletions(-) diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h index e000cce..9b94f18 100644 --- a/arch/powerpc/include/asm/mpic.h +++ b/arch/powerpc/include/asm/mpic.h @@ -301,9 +301,6 @@ struct mpic struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS]; struct mpic_reg_bank isus[MPIC_MAX_ISU]; - /* Protected sources */ - unsigned long *protected; - #ifdef CONFIG_MPIC_WEIRD /* Pointer to HW info array */ u32 *hw_set; diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 7c13426..a98f41d 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -947,8 +947,6 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq, if (hw == mpic->spurious_vec) return -EINVAL; - if (mpic->protected && test_bit(hw, mpic->protected)) - return -EINVAL; #ifdef CONFIG_SMP else if (hw >= mpic->ipi_vecs[0]) { @@ -1095,26 +1093,6 @@ struct mpic * __init mpic_alloc(struct device_node *node, if (node && of_get_property(node, "big-endian", NULL) != NULL) mpic->flags |= MPIC_BIG_ENDIAN; - /* Look for protected sources */ - if (node) { - int psize; - unsigned int bits, mapsize; - const u32 *psrc = - of_get_property(node, "protected-sources", &psize); - if (psrc) { - psize /= 4; - bits = intvec_top + 1; - mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long); - mpic->protected = kzalloc(mapsize, GFP_KERNEL); - BUG_ON(mpic->protected == NULL); - for (i = 0; i < psize; i++) { - if (psrc[i] > intvec_top) - continue; - __set_bit(psrc[i], mpic->protected); - } - } - } - #ifdef CONFIG_MPIC_WEIRD mpic->hw_set = mpic_infos[MPIC_GET_REGSET(flags)]; #endif @@ -1321,9 +1299,6 @@ void __init mpic_init(struct mpic *mpic) u32 vecpri = MPIC_VECPRI_MASK | i | (8 << MPIC_VECPRI_PRIORITY_SHIFT); - /* check if protected */ - if (mpic->protected && test_bit(i, mpic->protected)) - continue; /* init hw */ mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1 << cpu); @@ -1492,13 +1467,6 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg) mpic_eoi(mpic); return NO_IRQ; } - if (unlikely(mpic->protected && test_bit(src, mpic->protected))) { - if (printk_ratelimit()) - printk(KERN_WARNING "%s: Got protected source %d !\n", - mpic->name, (int)src); - mpic_eoi(mpic); - return NO_IRQ; - } return irq_linear_revmap(mpic->irqhost, src); } @@ -1532,12 +1500,6 @@ unsigned int mpic_get_coreint_irq(void) mpic_eoi(mpic); return NO_IRQ; } - if (unlikely(mpic->protected && test_bit(src, mpic->protected))) { - if (printk_ratelimit()) - printk(KERN_WARNING "%s: Got protected source %d !\n", - mpic->name, (int)src); - return NO_IRQ; - } return irq_linear_revmap(mpic->irqhost, src); #else