Rafael J. Wysocki wrote:Well, so far it's working: about ten poweroffs since I patched it, and no issues with any of them. Prior to that, it seemed like about one in five poweroffs wouldn't (power off). It'll take a lot more testing to confirm, though. What can I call to determine if more than one CPU is enabled, anyway? Here's the hack I'm using here, very situation (2 cores) specific, and it still has some printk's leftover with a sleep so I have time to read them before the lights go out. :) --- old/arch/i386/kernel/reboot.c 2007-09-27 17:17:00.000000000 -0400 +++ linux/arch/i386/kernel/reboot.c 2007-09-27 17:15:35.000000000 -0400 @@ -393,8 +393,22 @@ .halt = native_machine_halt, }; +static void kill_cpu1(void) +{ + extern int cpu_down(unsigned int cpu); + + printk(KERN_EMERG "kill_cpu1: was running on CPU%d\n", smp_processor_id()); + /* Some bioses don't like being called from CPU != 0 */ + set_cpus_allowed(current, cpumask_of_cpu(0)); + printk(KERN_EMERG "kill_cpu1: now running on CPU%d\n", smp_processor_id()); + cpu_down(1); + printk(KERN_EMERG "kill_cpu1: done\n"); + msleep(1000); +} + void machine_power_off(void) { + (void)kill_cpu1(); machine_ops.power_off(); } -
| Justin C. Sherrill | Re: pkgsrc bulk build and tiff |
| Linus Torvalds | Linux 2.6.27-rc5 |
| Ingo Molnar | [crash, bisected] Kernel BUG at ffffffff8079afb1 (__netif_schedule()) |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Evgeniy Polyakov | Re: tbench wrt. loopback TSO |
