Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755554AbXJARz5 (ORCPT ); Mon, 1 Oct 2007 13:55:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752813AbXJARzu (ORCPT ); Mon, 1 Oct 2007 13:55:50 -0400 Received: from charybdis-ext.suse.de ([195.135.221.2]:57474 "EHLO emea5-mh.id5.novell.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752730AbXJARzu (ORCPT ); Mon, 1 Oct 2007 13:55:50 -0400 Message-ID: <4701349A.30200@suse.de> Date: Mon, 01 Oct 2007 21:55:38 +0400 From: Alexey Starikovskiy User-Agent: Thunderbird 2.0.0.6 (X11/20070924) MIME-Version: 1.0 To: "Rafael J. Wysocki" CC: Bill Davidsen , Mark Lord , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: regression in 2.6.23-rc8 - power off failed References: <20070929005453.GA4475@erig.dyndns.org> <46FE6E17.6070109@suse.de> <46FEB9CA.9090703@tmr.com> <200709292308.13593.rjw@sisk.pl> In-Reply-To: <200709292308.13593.rjw@sisk.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2142 Lines: 54 Rafael J. Wysocki wrote: > On Saturday, 29 September 2007 22:47, Bill Davidsen wrote: >> Alexey Starikovskiy wrote: >> >>> -static void >>> -acpi_power_off (void) >>> -{ >>> - printk("%s called\n",__FUNCTION__); >>> - /* Some SMP machines only can poweroff in boot CPU */ >>> - set_cpus_allowed(current, cpumask_of_cpu(0)); >>> ACPI in kernel 2.6.12 did disable non-boot cpus too in powe_off. >>> Later only comment was left for some reason... >>> >> Am I midreading that code, or does it really assume that the boot cpu is >> always zero? Or just that zero will be able to do the power off? >> >> In any case I have had an SMP machine which did not have a CPU zero, and >> it was discussed here, I believe. Wonder what happens if you set >> affinity to a CPU you don't have... > > Good question, but it also caused other problems to appear, IIRC. > > IMHO, it's better to call disable_nonboot_cpus() in an appropriate place > anyway. > > Greetings, > Rafael Ok, here is commit which removed the code in question from acpi_power_off: commit 6660316cb7a1a2c59a73a52870490c0f782f45c1 Author: Eric W. Biederman Date: Tue Jul 26 12:16:00 2005 -0600 [PATCH] acpi_power_off: Don't switch to the boot cpu machine_power_off on i386 and x86_64 now switch to the boot cpu out of paranoia and because the MP Specification indicates it is a good idea on reboot, so for those architectures it is a noop. I can't see anything in the acpi spec that requires you to be on the boot cpu to power off the system, so this should not be an issue for ia64. In addition ia64 has the altix a massive multi-node system where switching to the boot cpu sounds insane as we may hot removed the boot cpu. Signed-off-by: Eric W. Biederman Signed-off-by: Linus Torvalds Regards, Alex. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/