From: Mark Lord <lkml@rtr.ca>
To: Santiago Garcia Mantinan <manty@manty.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 32-bit Athlon X2 won't poweroff (was: Fix SMP poweroff hangs)
Date: Sun, 30 Sep 2007 18:52:53 -0400 [thread overview]
Message-ID: <470028C5.7020501@rtr.ca> (raw)
In-Reply-To: <20070930200336.GA2441@pul.manty.net>
Santiago Garcia Mantinan wrote:
> I booted into single mode, then umounted all unneeded stuff and put / to ro,
> stopped all unused raids, ... then did...
..
>> strace /bin/halt -f -p
..
> rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
> rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> nanosleep({2, 0}, {2, 0}) = 0
> reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART|0x88888888) = 0
> kill(1, SIGTSTP) = 0
> reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF <unfinished ... exit status 0>
>
> Same output on the screen as I commented before, again I got to the shell
> and this time I even typed some commands like ps and amazingly they still
> worked, even though this was supposed to be halted.
Mmm.. okay, user space is doing the right things.
So next is inside the kernel itself, at linux/kernel/sys.c :: sys_reboot(),
where we see this code:
/* Instead of trying to make the power_off code look like
* halt when pm_power_off is not set do it the easy way.
*/
if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !pm_power_off)
cmd = LINUX_REBOOT_CMD_HALT;
This converts a "poweroff" into a "reboot" if no machine dependent
power off function has been bound in (pm_power_off() is a function pointer).
So for this to work, I believe that either ACPI or APM has to have been
configured into the kernel (and the modules loaded). Your kernel .config
from earlier shows ACPI built-in to the kernel core, so it should be present.
Unless you booted with noacpi or some such parameter..
So let's have a look at the kernel boot logs,
and you could also try CONGIG_ACPI_DEBUG=y
Bizarre (and nothing to do with my patch).
next prev parent reply other threads:[~2007-09-30 22:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 21:29 Problems with SMP & ACPI powering off Mark Lord
2007-09-27 21:30 ` Mark Lord
2007-09-27 22:00 ` Rafael J. Wysocki
2007-09-27 23:07 ` Mark Lord
2007-09-28 4:57 ` Len Brown
2007-09-28 12:55 ` Rafael J. Wysocki
2007-09-28 13:22 ` Mark Lord
2007-09-28 13:44 ` Rafael J. Wysocki
2007-09-28 13:46 ` Mark Lord
2007-09-28 13:52 ` [PATCH] disable non-boot CPUs before poweroff Mark Lord
2007-09-28 14:11 ` Mark Lord
2007-09-28 14:55 ` Thomas Gleixner
2007-09-28 19:53 ` [PATCH] (repost) Fix SMP poweroff hangs Mark Lord
2007-09-30 9:00 ` Santiago Garcia Mantinan
2007-09-30 17:21 ` Mark Lord
2007-09-30 17:54 ` Santiago Garcia Mantinan
2007-09-30 18:47 ` Mark Lord
2007-09-30 20:03 ` Santiago Garcia Mantinan
2007-09-30 22:52 ` Mark Lord [this message]
2007-09-30 22:56 ` 32-bit Athlon X2 won't poweroff Mark Lord
2007-10-01 16:19 ` 32-bit Athlon X2 won't poweroff (was: Fix SMP poweroff hangs) Santiago Garcia Mantinan
2007-10-01 16:37 ` 32-bit Athlon X2 won't poweroff Mark Lord
2007-10-01 20:05 ` [PATCH] (repost) Fix SMP poweroff hangs Rafael J. Wysocki
2007-10-01 22:38 ` Santiago Garcia Mantinan
2007-09-28 15:05 ` [PATCH] disable non-boot CPUs before poweroff Rafael J. Wysocki
2007-09-28 15:02 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=470028C5.7020501@rtr.ca \
--to=lkml@rtr.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=manty@manty.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.