From patchwork Thu Feb 7 08:07:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenhui zhao X-Patchwork-Id: 218862 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 058962C0398 for ; Thu, 7 Feb 2013 19:05:08 +1100 (EST) Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe004.messaging.microsoft.com [216.32.180.187]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 8A73C2C0294 for ; Thu, 7 Feb 2013 19:04:36 +1100 (EST) Received: from mail210-co1-R.bigfish.com (10.243.78.217) by CO1EHSOBE020.bigfish.com (10.243.66.83) with Microsoft SMTP Server id 14.1.225.23; Thu, 7 Feb 2013 08:04:31 +0000 Received: from mail210-co1 (localhost [127.0.0.1]) by mail210-co1-R.bigfish.com (Postfix) with ESMTP id 2AA46300127; Thu, 7 Feb 2013 08:04:31 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1155h) Received: from mail210-co1 (localhost.localdomain [127.0.0.1]) by mail210-co1 (MessageSwitch) id 136022426942587_9297; Thu, 7 Feb 2013 08:04:29 +0000 (UTC) Received: from CO1EHSMHS009.bigfish.com (unknown [10.243.78.195]) by mail210-co1.bigfish.com (Postfix) with ESMTP id 0782C3C0072; Thu, 7 Feb 2013 08:04:29 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS009.bigfish.com (10.243.66.19) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 7 Feb 2013 08:04:28 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.318.3; Thu, 7 Feb 2013 08:04:27 +0000 Received: from localhost.localdomain ([10.193.20.174]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r1784NdB024637; Thu, 7 Feb 2013 01:04:25 -0700 From: Zhao Chenhui To: Subject: [PATCH] mpic: fix Destination Registers init problem Date: Thu, 7 Feb 2013 16:07:00 +0800 Message-ID: <1360224420-5009-1-git-send-email-chenhui.zhao@freescale.com> X-Mailer: git-send-email 1.7.3 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The Freescale implementation of the MPIC only allows a single CPU destination for non-IPI interrupts. Test the flag MPIC_SINGLE_DEST_CPU to check if the Destination registers should be set. This prevents more than one bit is set at secondary processors initilizing time if the flag MPIC_SINGLE_DEST_CPU is set. Signed-off-by: Zhao Chenhui Signed-off-by: Li Yang --- arch/powerpc/sysdev/mpic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 9c6e535..cc537f8 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -1675,7 +1675,7 @@ void mpic_setup_this_cpu(void) * it differently, then we should make sure we also change the default * 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++) mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) | msk);