Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262326AbVAZPON (ORCPT ); Wed, 26 Jan 2005 10:14:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262327AbVAZPON (ORCPT ); Wed, 26 Jan 2005 10:14:13 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:33752 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S262326AbVAZPOG (ORCPT ); Wed, 26 Jan 2005 10:14:06 -0500 To: Sytse Wielinga Cc: "Barry K. Nathan" , linux-kernel@vger.kernel.org, Len Brown , Andrew Morton , fastboot@lists.osdl.org, Dave Jones Subject: Re: [PATCH 4/29] x86-i8259-shutdown References: <20050125035930.GG13394@redhat.com> <20050125094350.GA6372@ip68-4-98-123.oc.oc.cox.net> <20050125104904.GB5906@ip68-4-98-123.oc.oc.cox.net> <20050125220229.GB5726@ip68-4-98-123.oc.oc.cox.net> <20050126132741.GA23182@speedy.student.utwente.nl> <20050126144346.GD23182@speedy.student.utwente.nl> From: ebiederm@xmission.com (Eric W. Biederman) Date: 26 Jan 2005 08:12:05 -0700 In-Reply-To: <20050126144346.GD23182@speedy.student.utwente.nl> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1453 Lines: 31 Sytse Wielinga writes: > On Wed, Jan 26, 2005 at 07:06:50AM -0700, Eric W. Biederman wrote: > > How does the kernel shutdown fail? > It halts after saying 'acpi_power_off called'. Strangely, it only breaks when > using the Alt-SysRq-O poweroff function. Shutting down normally still powers > off the system (and does print 'acpi_power_off called'). I think it must have > something to do with the IDE devices not having powered down before > acpi_power_off is called, but I haven't seen the code so I have no idea what > really causes it to break. I am starting to hate the poor factoring of all of this stuff in the kernel. kernel/power/poweroff.c re-implements the wheel it comes to doing poweroff a system. Instead of doing a graceful power off it skips calling the powerdown notifer and calling device_shutdown. Since I moved the acpi prepare for powerdown in device_shutdown it makes sense that code path would now fail. Do you know if there is any deliberate reason Alt-SysRq-O skips doing a normal device shutdown work? If not I think I will just extract a common factor from kernel/sys.c/sys_reboot(CMD_POWER_OFF); And have both code paths call it. Eric - 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/