Bugzilla – Attachment 55992 Details for
Bug 118997
Machine does not switch off after shutdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Minimal patch
poweroff-fix (text/plain), 1.94 KB, created by
Olaf Kirch
on 2005-10-31 08:05:58 UTC
(
hide
)
Description:
Minimal patch
Filename:
MIME Type:
Creator:
Olaf Kirch
Created:
2005-10-31 08:05:58 UTC
Size:
1.94 KB
patch
obsolete
>From: Olaf Kirch <okir@suse.de> >Subject: Call reboot notifiers of power off >References: 118997 >Patch-mainline: 2.6.14 > >This is based on a patch by Eric Biedermann (posted on acpi-devel - 20.09.05) >(ebiederm@xmission.com). > >Index: linux-2.6.13/include/linux/reboot.h >=================================================================== >--- linux-2.6.13.orig/include/linux/reboot.h >+++ linux-2.6.13/include/linux/reboot.h >@@ -59,6 +59,8 @@ extern void machine_crash_shutdown(struc > * Architecture independent implemenations of sys_reboot commands. > */ > >+extern void kernel_power_off_prepare(void); >+ > extern void kernel_restart(char *cmd); > extern void kernel_halt(void); > extern void kernel_power_off(void); >Index: linux-2.6.13/kernel/sys.c >=================================================================== >--- linux-2.6.13.orig/kernel/sys.c >+++ linux-2.6.13/kernel/sys.c >@@ -410,11 +410,20 @@ void kernel_halt(void) > } > EXPORT_SYMBOL_GPL(kernel_halt); > >-void kernel_power_off(void) >+/** >+ * kernel_power_off - power_off the system >+ * >+ * Shutdown everything and perform a clean system power_off. >+ */ >+void kernel_power_off_prepare(void) > { > notifier_call_chain(&reboot_notifier_list, SYS_POWER_OFF, NULL); > system_state = SYSTEM_POWER_OFF; > device_shutdown(); >+} >+void kernel_power_off(void) >+{ >+ kernel_power_off_prepare(); > printk(KERN_EMERG "Power down.\n"); > machine_power_off(); > } >Index: linux-2.6.13/kernel/power/disk.c >=================================================================== >--- linux-2.6.13.orig/kernel/power/disk.c >+++ linux-2.6.13/kernel/power/disk.c >@@ -17,6 +17,7 @@ > #include <linux/delay.h> > #include <linux/fs.h> > #include <linux/mount.h> >+#include <linux/pm.h> > > #include "power.h" > >@@ -55,7 +56,7 @@ static void power_down(suspend_disk_meth > local_irq_save(flags); > switch(mode) { > case PM_DISK_PLATFORM: >- device_shutdown(); >+ kernel_power_off_prepare(); > error = pm_ops->enter(PM_SUSPEND_DISK); > break; > case PM_DISK_SHUTDOWN:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 118997
:
50929
|
50930
|
53919
| 55992 |
61817