From patchwork Fri Oct 10 11:56:51 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milton Miller X-Patchwork-Id: 3778 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 53CC648320 for ; Fri, 10 Oct 2008 23:01:35 +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 D7DF8DE19B for ; Fri, 10 Oct 2008 22:56:59 +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 m9ABupdo001050; 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 m9ABuphS001049; Fri, 10 Oct 2008 06:56:51 -0500 (CDT) Date: Fri, 10 Oct 2008 06:56:51 -0500 (CDT) From: Milton Miller To: linuxppc-dev@ozlabs.org, Ben Herrenschmidt , Paul Mackerras Message-id: In-Reply-To: Subject: [PATCH 16/16] powerpc ps3: use smp_request_message_ipi 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 ps3 has 4 ipis per cpu and can use the new smp_request_message_ipi to reduce path length when receiving an ipi. This has the side effect of setting IRQF_PERCPU. Signed-off-by: Milton Miller Index: next.git/arch/powerpc/platforms/ps3/smp.c =================================================================== --- next.git.orig/arch/powerpc/platforms/ps3/smp.c 2008-10-05 00:20:41.000000000 -0500 +++ next.git/arch/powerpc/platforms/ps3/smp.c 2008-10-05 00:22:50.000000000 -0500 @@ -32,12 +32,6 @@ #define DBG pr_debug #endif -static irqreturn_t ipi_function_handler(int irq, void *msg) -{ - smp_message_recv((int)(long)msg); - return IRQ_HANDLED; -} - /** * ps3_ipi_virqs - a per cpu array of virqs for ipi use */ @@ -45,13 +39,6 @@ static irqreturn_t ipi_function_handler( #define MSG_COUNT 4 static DEFINE_PER_CPU(unsigned int, ps3_ipi_virqs[MSG_COUNT]); -static const char *names[MSG_COUNT] = { - "ipi call", - "ipi reschedule", - "ipi migrate", - "ipi debug brk" -}; - static void do_message_pass(int target, int msg) { int result; @@ -119,8 +106,7 @@ static void __init ps3_smp_setup_cpu(int DBG("%s:%d: (%d, %d) => virq %u\n", __func__, __LINE__, cpu, i, virqs[i]); - result = request_irq(virqs[i], ipi_function_handler, - IRQF_DISABLED, names[i], (void*)(long)i); + result = smp_request_message_ipi(virqs[i], i); if (result) virqs[i] = NO_IRQ;