From patchwork Sat Jun 11 18:55:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 872232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5BItRLW009219 for ; Sat, 11 Jun 2011 18:55:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752276Ab1FKSz1 (ORCPT ); Sat, 11 Jun 2011 14:55:27 -0400 Received: from hiauly1.hia.nrc.ca ([132.246.10.84]:2689 "EHLO hiauly1.hia.nrc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679Ab1FKSz1 (ORCPT ); Sat, 11 Jun 2011 14:55:27 -0400 Received: by hiauly1.hia.nrc.ca (Postfix, from userid 1000) id 9232C531A; Sat, 11 Jun 2011 14:55:25 -0400 (EDT) Date: Sat, 11 Jun 2011 14:55:24 -0400 From: John David Anglin To: linux-parisc@vger.kernel.org Cc: kyle@mcmartin.ca, deller@gmx.de, jejb@parisc-linux.org Subject: [PATCH] parisc, don't claim cpu irqs more than once Message-ID: <20110611185524.GA1369@hiauly1.hia.nrc.ca> Reply-To: John David Anglin MIME-Version: 1.0 Content-Disposition: inline Organization: nrc.ca User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 11 Jun 2011 18:55:28 +0000 (UTC) The CPU irqs (timer and IPI) are not shared and only need to be claimed once. A mismatch error occurs if they are claimed more than once. Signed-off-by: John David Anglin Cc: Kyle McMartin Cc: Helge Deller Cc: "James E.J. Bottomley" Dave diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index c0b1aff..8293704 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -393,6 +393,12 @@ static struct irqaction ipi_action = { static void claim_cpu_irqs(void) { int i; +#ifdef CONFIG_SMP + static int irqs_claimed; + if (irqs_claimed) + return; + irqs_claimed = 1; +#endif for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) { irq_set_chip_and_handler(i, &cpu_interrupt_type, handle_percpu_irq);