From patchwork Fri Oct 10 11:56:50 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milton Miller X-Patchwork-Id: 3780 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id D476CDE6FB for ; Fri, 10 Oct 2008 23:02:09 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from sullivan.realtime.net (sullivan.realtime.net [205.238.132.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CAB2DDE341 for ; Fri, 10 Oct 2008 22:57:14 +1100 (EST) Received: from sullivan.realtime.net (localhost [127.0.0.1]) by sullivan.realtime.net (8.13.1/8.9.3) with ESMTP id m9ABupAw001043; Fri, 10 Oct 2008 06:56:51 -0500 (CDT) (envelope-from miltonm@sullivan.realtime.net) Received: (from miltonm@localhost) by sullivan.realtime.net (8.13.1/8.12.7/Submit) id m9ABuolZ001042; Fri, 10 Oct 2008 06:56:50 -0500 (CDT) Date: Fri, 10 Oct 2008 06:56:50 -0500 (CDT) From: Milton Miller To: linuxppc-dev@ozlabs.org, Ben Herrenschmidt , Paul Mackerras Message-id: In-Reply-To: Subject: [PATCH 15/16] powerpc cell: use smp_request_message_ipi Cc: Arnd Bergmann X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 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@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org cell native has 4 interrupts for ipis, so use the new smp_request_message_ipi to save pathlength and the data-dependent branch. This has the side effects of enabling the debugger ipi for kdump and setting IRQF_PERCPU for the ipi interrupts. It doesn't undo the virq mapping if it turns out the ipi is not used. Signed-off-by: Milton Miller Index: next.git/arch/powerpc/platforms/cell/interrupt.c =================================================================== --- next.git.orig/arch/powerpc/platforms/cell/interrupt.c 2008-10-04 23:40:24.000000000 -0500 +++ next.git/arch/powerpc/platforms/cell/interrupt.c 2008-10-04 23:44:49.000000000 -0500 @@ -190,38 +190,25 @@ struct irq_host *iic_get_irq_host(int no } EXPORT_SYMBOL_GPL(iic_get_irq_host); -static irqreturn_t iic_ipi_action(int irq, void *dev_id) -{ - int ipi = (int)(long)dev_id; - - smp_message_recv(ipi); - - return IRQ_HANDLED; -} -static void iic_request_ipi(int ipi, const char *name) +static void iic_request_ipi(int ipi) { int virq; virq = irq_create_mapping(iic_host, iic_ipi_to_irq(ipi)); if (virq == NO_IRQ) { printk(KERN_ERR - "iic: failed to map IPI %s\n", name); + "iic: failed to map IPI %s\n", smp_ipi_name[ipi]); return; } - if (request_irq(virq, iic_ipi_action, IRQF_DISABLED, name, - (void *)(long)ipi)) - printk(KERN_ERR - "iic: failed to request IPI %s\n", name); + smp_request_message_ipi(virq, ipi); } void iic_request_IPIs(void) { - iic_request_ipi(PPC_MSG_CALL_FUNCTION, "IPI-call"); - iic_request_ipi(PPC_MSG_RESCHEDULE, "IPI-resched"); - iic_request_ipi(PPC_MSG_CALL_FUNC_SINGLE, "IPI-call-single"); -#ifdef CONFIG_DEBUGGER - iic_request_ipi(PPC_MSG_DEBUGGER_BREAK, "IPI-debug"); -#endif /* CONFIG_DEBUGGER */ + iic_request_ipi(PPC_MSG_CALL_FUNCTION); + iic_request_ipi(PPC_MSG_RESCHEDULE); + iic_request_ipi(PPC_MSG_CALL_FUNC_SINGLE); + iic_request_ipi(PPC_MSG_DEBUGGER_BREAK); } #endif /* CONFIG_SMP */