* [PATCH V1] hotplug: eliminate warning Unknown IPI message 0x1
@ 2012-02-10 9:27 Bill Carson
2012-02-10 9:27 ` [PATCH] hotplug: eliminate warning "Unknown IPI message 0x1" Bill Carson
0 siblings, 1 reply; 4+ messages in thread
From: Bill Carson @ 2012-02-10 9:27 UTC (permalink / raw)
To: linux-arm-kernel
Hi, All
Does the second parameter of gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
have special meaning? because most of the callers have 1 for this, while 0 for mach-highbank.
This hard code value also causes hotplug warnings:
/sys/devices/system/cpu # echo 0 > cpu3/online
CPU3: shutdown
/sys/devices/system/cpu # echo 1 > cpu3/online
CPU3: Booted secondary processor
Calibrating delay loop (skipped) already calibrated this CPU
CPU3: Unknown IPI message 0x1
IMHO, it's necessary to introduce a new ipi_msg_type to eliminate this warning.
And I did the testing on vexpress board, so far so good.
So any comments?
Bill Carson(1)
hotplug: Introduce a new ipi_msg_type to eliminate phony warning
Signed-off-by: Bill Carson <bill4carson@gmail.com>
---
arch/arm/include/asm/hardirq.h | 2 +-
arch/arm/kernel/smp.c | 5 +++++
arch/arm/plat-versatile/platsmp.c | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] hotplug: eliminate warning "Unknown IPI message 0x1"
2012-02-10 9:27 [PATCH V1] hotplug: eliminate warning Unknown IPI message 0x1 Bill Carson
@ 2012-02-10 9:27 ` Bill Carson
2012-02-10 9:59 ` Russell King - ARM Linux
0 siblings, 1 reply; 4+ messages in thread
From: Bill Carson @ 2012-02-10 9:27 UTC (permalink / raw)
To: linux-arm-kernel
When playing hotplug on vexpress board, a tiny warning pops out.
/sys/devices/system/cpu # echo 0 > cpu3/online
CPU3: shutdown
/sys/devices/system/cpu # echo 1 > cpu3/online
CPU3: Booted secondary processor
Calibrating delay loop (skipped) already calibrated this CPU
CPU3: Unknown IPI message 0x1
^^^^^^^
It's a phony warning caused by handle_IPI as a result of calling
gic_raise_softirq(cpumask_of(cpu), 1). Introducing a new ipi_msg_type
IPI_WAKEUP_CPU to make this warning go away.
with this patch, now hotplug looks like:
/sys/devices/system/cpu # echo 0 > cpu3/online ; echo 1 > cpu3/online \
cat /proc/interrupts
CPU3: shutdown
CPU3: Booted secondary processor
Calibrating delay loop (skipped) already calibrated this CPU
CPU3 got wake up!
CPU0 CPU1 CPU2 CPU3
29: 5743 5730 5721 5711 GIC twd
34: 27 0 0 0 GIC timer
36: 0 0 0 0 GIC rtc-pl031
37: 262 0 0 0 GIC uart-pl011
41: 0 0 0 0 GIC mmci-pl18x (cmd)
42: 0 0 0 0 GIC mmci-pl18x (pio)
44: 9 0 0 0 GIC kmi-pl050
45: 101 0 0 0 GIC kmi-pl050
47: 0 0 0 0 GIC eth0
IPI0: 0 0 0 0 Timer broadcast interrupts
IPI1: 466 463 59 13 Rescheduling interrupts
IPI2: 0 2 2 2 Function call interrupts
IPI3: 0 0 0 6 Single function call interrupts
IPI4: 0 0 0 0 CPU stop interrupts
IPI5: 0 1 1 2 CPU wakeup interrupts
Err: 0
Signed-off-by: Bill Carson <bill4carson@gmail.com>
---
arch/arm/include/asm/hardirq.h | 2 +-
arch/arm/kernel/smp.c | 5 +++++
arch/arm/plat-versatile/platsmp.c | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h
index 436e60b..2740c2a 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 cdeb727..7418e13 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -56,6 +56,7 @@ enum ipi_msg_type {
IPI_CALL_FUNC,
IPI_CALL_FUNC_SINGLE,
IPI_CPU_STOP,
+ IPI_WAKEUP_CPU,
};
int __cpuinit __cpu_up(unsigned int cpu)
@@ -393,6 +394,7 @@ static const char *ipi_types[NR_IPI] = {
S(IPI_CALL_FUNC, "Function call interrupts"),
S(IPI_CALL_FUNC_SINGLE, "Single function call interrupts"),
S(IPI_CPU_STOP, "CPU stop interrupts"),
+ S(IPI_WAKEUP_CPU, "CPU wakeup interrupts"),
};
void show_ipi_list(struct seq_file *p, int prec)
@@ -558,6 +560,9 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
ipi_cpu_stop(cpu);
irq_exit();
break;
+ case IPI_WAKEUP_CPU:
+ pr_info("CPU%u got wake up!\n", cpu);
+ break;
default:
printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n",
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index 49c7db4..7188034 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c
@@ -85,7 +85,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
* the boot monitor to read the system wide flags register,
* and branch to the address found there.
*/
- gic_raise_softirq(cpumask_of(cpu), 1);
+ gic_raise_softirq(cpumask_of(cpu), 7 /* IPI_WAKEUP_CPU */);
timeout = jiffies + (1 * HZ);
while (time_before(jiffies, timeout)) {
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] hotplug: eliminate warning "Unknown IPI message 0x1"
2012-02-10 9:27 ` [PATCH] hotplug: eliminate warning "Unknown IPI message 0x1" Bill Carson
@ 2012-02-10 9:59 ` Russell King - ARM Linux
2012-02-13 1:07 ` bill4carson
0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2012-02-10 9:59 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 10, 2012 at 05:27:53PM +0800, Bill Carson wrote:
> When playing hotplug on vexpress board, a tiny warning pops out.
>
> /sys/devices/system/cpu # echo 0 > cpu3/online
> CPU3: shutdown
> /sys/devices/system/cpu # echo 1 > cpu3/online
> CPU3: Booted secondary processor
> Calibrating delay loop (skipped) already calibrated this CPU
> CPU3: Unknown IPI message 0x1
> ^^^^^^^
> It's a phony warning caused by handle_IPI as a result of calling
> gic_raise_softirq(cpumask_of(cpu), 1). Introducing a new ipi_msg_type
> IPI_WAKEUP_CPU to make this warning go away.
NAK. I want people to move to SGI0 for this, so that we can have SGI1-N
as the proper IPIs. The reason _I_ haven't done this is because it's
totally unclear whether anyone relies on the current IPI number.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] hotplug: eliminate warning "Unknown IPI message 0x1"
2012-02-10 9:59 ` Russell King - ARM Linux
@ 2012-02-13 1:07 ` bill4carson
0 siblings, 0 replies; 4+ messages in thread
From: bill4carson @ 2012-02-13 1:07 UTC (permalink / raw)
To: linux-arm-kernel
On 2012?02?10? 17:59, Russell King - ARM Linux wrote:
> On Fri, Feb 10, 2012 at 05:27:53PM +0800, Bill Carson wrote:
>> When playing hotplug on vexpress board, a tiny warning pops out.
>>
>> /sys/devices/system/cpu # echo 0> cpu3/online
>> CPU3: shutdown
>> /sys/devices/system/cpu # echo 1> cpu3/online
>> CPU3: Booted secondary processor
>> Calibrating delay loop (skipped) already calibrated this CPU
>> CPU3: Unknown IPI message 0x1
>> ^^^^^^^
>> It's a phony warning caused by handle_IPI as a result of calling
>> gic_raise_softirq(cpumask_of(cpu), 1). Introducing a new ipi_msg_type
>> IPI_WAKEUP_CPU to make this warning go away.
>
> NAK. I want people to move to SGI0 for this, so that we can have SGI1-N
> as the proper IPIs. The reason _I_ haven't done this is because it's
> totally unclear whether anyone relies on the current IPI number.
>
Thanks for your explanation, now I understand what's going on here.
--
I am a slow learner
but I will keep trying to fight for my dreams!
--bill
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-13 1:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 9:27 [PATCH V1] hotplug: eliminate warning Unknown IPI message 0x1 Bill Carson
2012-02-10 9:27 ` [PATCH] hotplug: eliminate warning "Unknown IPI message 0x1" Bill Carson
2012-02-10 9:59 ` Russell King - ARM Linux
2012-02-13 1:07 ` bill4carson
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).