From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: formalize an IPI for CPU wake-ups
Date: Wed, 29 Aug 2012 00:21:37 -0700 [thread overview]
Message-ID: <503DC301.3010705@codeaurora.org> (raw)
In-Reply-To: <50352D82.2050509@codeaurora.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------
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 <linux/threads.h>
#include <asm/irq.h>
-#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();
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2012-08-29 7:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 15:54 [PATCH] ARM: formalize an IPI for CPU wake-ups Nicolas Pitre
2012-06-11 15:57 ` Russell King - ARM Linux
2012-06-11 16:44 ` Nicolas Pitre
2012-06-11 16:51 ` Russell King - ARM Linux
2012-06-11 17:18 ` Nicolas Pitre
2012-06-11 17:41 ` Stephen Boyd
2012-06-11 19:25 ` Russell King - ARM Linux
2012-06-20 16:32 ` Stephen Boyd
2012-07-11 6:34 ` Kukjin Kim
2012-07-30 18:19 ` Stephen Boyd
2012-08-01 9:42 ` Kukjin Kim
2012-08-06 20:41 ` Colin Cross
2012-08-07 17:00 ` Russell King - ARM Linux
2012-08-08 7:04 ` Shilimkar, Santosh
2012-08-08 10:39 ` Kukjin Kim
2012-08-08 6:52 ` Magnus Damm
2012-08-13 22:09 ` Stephen Boyd
2012-08-22 19:05 ` Stephen Boyd
2012-08-22 21:23 ` Magnus Damm
2012-08-29 7:21 ` Stephen Boyd [this message]
2012-09-08 14:47 ` Nicolas Pitre
2012-06-11 18:26 ` Russell King - ARM Linux
2012-06-11 18:40 ` Nicolas Pitre
2012-06-11 18:41 ` Russell King - ARM Linux
2012-06-11 19:11 ` Nicolas Pitre
2012-06-11 19:20 ` Russell King - ARM Linux
2012-06-11 19:56 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=503DC301.3010705@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).