[PATCH 07/10] powerpc: add NMI IPI infrastructure

Nicholas Piggin npiggin at gmail.com
Fri Feb 3 22:45:24 AEDT 2017


On Tue, 20 Dec 2016 04:30:08 +1000
Nicholas Piggin <npiggin at gmail.com> wrote:

> +static void do_smp_send_nmi_ipi(int cpu)
> +{
> +	if (cpu >= 0) {
> +		do_message_pass(cpu, PPC_MSG_NMI_IPI);
> +	} else {
> +		unsigned int c;
> +
> +		for_each_online_cpu(c) {
> +			if (c == raw_smp_processor_id())
> +				continue;
> +			do_message_pass(cpu, PPC_MSG_NMI_IPI);

Okay this has a bug in the fallback path. Needs the following
incremental patch. sysrq+x works okay with this (tested in mambo),
and also recovers with "x" okay.

Thanks,
Nick

---
 arch/powerpc/kernel/smp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 81256522985d..a9f8c70d1033 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -420,12 +420,12 @@ static void do_smp_send_nmi_ipi(int cpu)
 	if (cpu >= 0) {
 		do_message_pass(cpu, PPC_MSG_NMI_IPI);
 	} else {
-		unsigned int c;
+		int c;
 
 		for_each_online_cpu(c) {
 			if (c == raw_smp_processor_id())
 				continue;
-			do_message_pass(cpu, PPC_MSG_NMI_IPI);
+			do_message_pass(c, PPC_MSG_NMI_IPI);
 		}
 	}
 }
-- 
2.11.0



More information about the Linuxppc-dev mailing list