Jan Beulich
2010-Nov-16 07:36 UTC
[Xen-devel] [PATCH] linux-2.6.18: don''t register shutdown watch and suspend event channel for Dom0
This pointlessly consumes resources and poses the risk of either getting triggered inadvertently. Signed-off-by: Jan Beulich <jbeulich@novell.com> --- a/drivers/xen/core/reboot.c +++ b/drivers/xen/core/reboot.c @@ -280,6 +280,15 @@ static int setup_shutdown_watcher(void) { int err; + err = register_xenbus_watch(&sysrq_watch); + if (err) { + printk(KERN_ERR "Failed to set sysrq watcher\n"); + return err; + } + + if (is_initial_xendomain()) + return 0; + xenbus_scanf(XBT_NIL, "control", "platform-feature-multiprocessor-suspend", "%d", &fast_suspend); @@ -290,12 +299,6 @@ static int setup_shutdown_watcher(void) return err; } - err = register_xenbus_watch(&sysrq_watch); - if (err) { - printk(KERN_ERR "Failed to set sysrq watcher\n"); - return err; - } - /* suspend event channel */ err = setup_suspend_evtchn(); if (err) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel