From patchwork Wed Aug 29 07:21:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 1384081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 112A73FDF6 for ; Wed, 29 Aug 2012 07:24:56 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T6cbA-0004Rx-VW; Wed, 29 Aug 2012 07:22:01 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T6cb6-0004RF-PV for linux-arm-kernel@lists.infradead.org; Wed, 29 Aug 2012 07:21:57 +0000 X-IronPort-AV: E=McAfee;i="5400,1158,6818"; a="228294533" Received: from pdmz-ns-mip.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.114.10]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Aug 2012 00:21:40 -0700 Received: from [10.64.9.148] (pdmz-ns-snip_218_1.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id BB34310004B6; Wed, 29 Aug 2012 00:21:38 -0700 (PDT) Message-ID: <503DC301.3010705@codeaurora.org> Date: Wed, 29 Aug 2012 00:21:37 -0700 From: Stephen Boyd User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Russell King - ARM Linux Subject: Re: [PATCH] ARM: formalize an IPI for CPU wake-ups References: <20120611155716.GA18267@n2100.arm.linux.org.uk> <20120611165115.GB18267@n2100.arm.linux.org.uk> <4FD62DBB.8070407@codeaurora.org> <20120611192519.GF18267@n2100.arm.linux.org.uk> <4FE1FB15.3090305@codeaurora.org> <0e0201cd5f2f$2c2f6e60$848e4b20$%kim@samsung.com> <5016D03D.8010607@codeaurora.org> <50297B34.5090504@codeaurora.org> <50352D82.2050509@codeaurora.org> In-Reply-To: <50352D82.2050509@codeaurora.org> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.251 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kukjin Kim , Nicolas Pitre , Magnus Damm , "Rafael J. Wysocki" , Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 8/22/2012 12:05 PM, Stephen Boyd wrote: > Ok, I've put it in the patch tracker. > Russell, what's involved in getting rid of the printk now? Can we just shift everything down by 1 and then formalize 0 as the wakeup ipi? Or do you want to completely remove that ipi from the stats? It's not clear to me what we should do. Something like the following untested patch would be a possibility. ----8<------->8------ Reviewed-by: Nicolas Pitre diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 436e60b..2740c2a2 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h @@ -5,7 +5,7 @@ #include #include -#define NR_IPI 5 +#define NR_IPI 6 typedef struct { unsigned int __softirq_pending; diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index ebd8ad2..d98c37e 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -51,7 +51,8 @@ struct secondary_data secondary_data; enum ipi_msg_type { - IPI_TIMER = 2, + IPI_WAKEUP, + IPI_TIMER, IPI_RESCHEDULE, IPI_CALL_FUNC, IPI_CALL_FUNC_SINGLE, @@ -347,7 +348,8 @@ void arch_send_call_function_single_ipi(int cpu) } static const char *ipi_types[NR_IPI] = { -#define S(x,s) [x - IPI_TIMER] = s +#define S(x,s) [x] = s + S(IPI_WAKEUP, "CPU wakeup interrupts"), S(IPI_TIMER, "Timer broadcast interrupts"), S(IPI_RESCHEDULE, "Rescheduling interrupts"), S(IPI_CALL_FUNC, "Function call interrupts"), @@ -500,10 +502,13 @@ void handle_IPI(int ipinr, struct pt_regs *regs) unsigned int cpu = smp_processor_id(); struct pt_regs *old_regs = set_irq_regs(regs); - if (ipinr >= IPI_TIMER && ipinr < IPI_TIMER + NR_IPI) - __inc_irq_stat(cpu, ipi_irqs[ipinr - IPI_TIMER]); + if (ipinr < NR_IPI) + __inc_irq_stat(cpu, ipi_irqs[ipinr]); switch (ipinr) { + case IPI_WAKEUP: + break; + case IPI_TIMER: irq_enter(); ipi_timer();