Re: [PATCH 4/29] x86-i8259-shutdown

From: Eric W. Biederman
Date: Wed Jan 26 2005 - 10:16:57 EST


Sytse Wielinga <s.b.wielinga@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/