From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sipsolutions.net (xc.sipsolutions.net [83.246.72.84]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5EC64DDF4A for ; Thu, 25 Sep 2008 18:57:28 +1000 (EST) Subject: Re: [Bugme-new] [Bug 11629] New: quad G5 fails to shut down From: Johannes Berg To: Andrew Morton In-Reply-To: <20080923143057.e3e54536.akpm@linux-foundation.org> References: <20080923143057.e3e54536.akpm@linux-foundation.org> Content-Type: text/plain Date: Thu, 25 Sep 2008 10:56:25 +0200 Message-Id: <1222332986.10563.35.camel@johannes.berg> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, bugme-daemon@bugzilla.kernel.org, Thomas Gleixner , Ingo Molnar List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , I wrote: > And here's the fix. Well, that should of course remove that comment there too. New version below. From: Johannes Berg Subject: powerpc: fix shutdown I tracked down the shutdown regression to CPUs not dying when being shut down during power-off. This turns out to be due to the system_state being SYSTEM_POWER_OFF, which this code doesn't take as a valid state for shutting off CPUs in. This has never made sense to me, but when I added hotplug code to implement hibernate I only "made it work" and did not question the need to check the system_state. Thomas Gleixner helped me dig, but the only thing we found is that it was added with the original commit that added CPU hotplug support. Signed-off-by: Johannes Berg Cc: Thomas Gleixner Cc: Joel Schopp Cc: Benjamin Herrenschmidt --- arch/powerpc/kernel/idle.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- everything.orig/arch/powerpc/kernel/idle.c 2008-09-01 12:28:37.000000000 +0200 +++ everything/arch/powerpc/kernel/idle.c 2008-09-25 10:55:45.000000000 +0200 @@ -34,11 +34,7 @@ #include #ifdef CONFIG_HOTPLUG_CPU -/* this is used for software suspend, and that shuts down - * CPUs even while the system is still booting... */ -#define cpu_should_die() (cpu_is_offline(smp_processor_id()) && \ - (system_state == SYSTEM_RUNNING \ - || system_state == SYSTEM_BOOTING)) +#define cpu_should_die() cpu_is_offline(smp_processor_id()) #else #define cpu_should_die() 0 #endif