From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754759AbbCYRZ7 (ORCPT ); Wed, 25 Mar 2015 13:25:59 -0400 Received: from mail-pd0-f201.google.com ([209.85.192.201]:33732 "EHLO mail-pd0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302AbbCYRZx (ORCPT ); Wed, 25 Mar 2015 13:25:53 -0400 From: Andrew Bresticker To: Ralf Baechle Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Andrew Bresticker , James Hogan , "Maciej W. Rozycki" Subject: [PATCH V2 1/2] MIPS: smp: Make stop_this_cpu() actually stop the CPU Date: Wed, 25 Mar 2015 10:25:43 -0700 Message-Id: <1427304344-24739-1-git-send-email-abrestic@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since cpu_wait() enables interrupts upon return, CPUs which have entered stop_this_cpu() may still end up handling interrupts. This can lead to the softlockup detector firing on a panic or restart/poweroff/halt. Just disable interrupts and spin to ensure nothing else runs on the CPU once it has entered stop_this_cpu(). Signed-off-by: Andrew Bresticker Cc: James Hogan Cc: Maciej W. Rozycki --- New for v2. --- arch/mips/kernel/smp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 1c0d8c5..5b020bd 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -176,10 +176,8 @@ static void stop_this_cpu(void *dummy) * Remove this CPU: */ set_cpu_online(smp_processor_id(), false); - for (;;) { - if (cpu_wait) - (*cpu_wait)(); /* Wait if available. */ - } + local_irq_disable(); + while (1); } void smp_send_stop(void) -- 2.2.0.rc0.207.ga3a616c