Wolfgang Erig wrote:On Sat, Sep 29, 2007 at 01:30:33AM -0700, H. Peter Anvin wrote:Wolfgang Erig wrote:Both are bad.I believe there must have been something wrong here (possibly
Two different systems and two different bisections.
I sent the last step of each.
This problem (no power off) persists after pull some minutes ago.$ git bisect good Bisecting: 0 revisions left to test after this [626073132b381684c4983e0d911e9aceb32e2cbc] Assembly header and main routine for new x86 setup codeOK, so which one is the bad one?
Sorry for the confusion.
inconsistent experiments?) This checkin has *zero code changes* from
the previous one (and next one) -- the kernel should have been binarily
identical to the previous one. The code introduced in this checkin
doesn't even get compiled until two checkins later,
4fd06960f120e02e9abc802a09f9511c400042a5.
I have done two bisections simultanously and it was late at night.
I start again with a fresh tree and better controlled experiments.
If this is an SMP system, then you could just be getting random results,
depending upon which CPU is attempting the poweroff.
I have a newish patch in Andrew's tree now to fix SMP poweroff
(has been broken forever), reproduced here below in case you missed it.
* * *
We need to disable all CPUs other than the boot CPU (usually 0)
before attempting to power-off modern SMP machines.
This fixes the hang-on-poweroff issue on my MythTV SMP box,
and also on Thomas Gleixner's new toybox.
Signed-off-by: Mark Lord <mlord@xxxxxxxxx>
Acked-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
--- linux/kernel/sys.c.orig 2007-09-13 09:49:11.000000000 -0400
+++ linux/kernel/sys.c 2007-09-28 15:48:54.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/getcpu.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/seccomp.h>
+#include <linux/cpu.h>
#include <linux/compat.h>
#include <linux/syscalls.h>
@@ -878,6 +879,7 @@
kernel_shutdown_prepare(SYSTEM_POWER_OFF);
if (pm_power_off_prepare)
pm_power_off_prepare();
+ disable_nonboot_cpus();
sysdev_shutdown();
printk(KERN_EMERG "Power down.\n");
machine_power_off();