From: "Jan Beulich" Subject: [PATCH] linux-2.6.18: don't register shutdown watch and suspend event channel for Dom0 Date: Tue, 16 Nov 2010 07:36:12 +0000 Message-ID: <4CE2427C02000078000226C4@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part8EA32D7C.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part8EA32D7C.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This pointlessly consumes resources and poses the risk of either getting triggered inadvertently. Signed-off-by: Jan Beulich --- a/drivers/xen/core/reboot.c +++ b/drivers/xen/core/reboot.c @@ -280,6 +280,15 @@ static int setup_shutdown_watcher(void) { int err; =20 + err =3D 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; } =20 - err =3D register_xenbus_watch(&sysrq_watch); - if (err) { - printk(KERN_ERR "Failed to set sysrq watcher\n"); - return err; - } - /* suspend event channel */ err =3D setup_suspend_evtchn(); if (err) { --=__Part8EA32D7C.0__= Content-Type: text/plain; name="xen-dom0-no-suspend.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen-dom0-no-suspend.patch" Subject: don't register shutdown watch and suspend event channel for = Dom0=0A=0AThis pointlessly consumes resources and poses the risk of = either=0Agetting triggered inadvertently.=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/drivers/xen/core/reboot.c=0A+++ b/drivers/= xen/core/reboot.c=0A@@ -280,6 +280,15 @@ static int setup_shutdown_watcher(= void)=0A {=0A int err;=0A =0A+ err =3D register_xenbus_watch(&sysr= q_watch);=0A+ if (err) {=0A+ printk(KERN_ERR "Failed to set = sysrq watcher\n");=0A+ return err;=0A+ }=0A+=0A+ if = (is_initial_xendomain())=0A+ return 0;=0A+=0A xenbus_scan= f(XBT_NIL, "control",=0A "platform-feature-multiprocess= or-suspend",=0A "%d", &fast_suspend);=0A@@ -290,12 = +299,6 @@ static int setup_shutdown_watcher(void)=0A return = err;=0A }=0A =0A- err =3D register_xenbus_watch(&sysrq_watch)= ;=0A- if (err) {=0A- printk(KERN_ERR "Failed to set sysrq = watcher\n");=0A- return err;=0A- }=0A-=0A /* suspend = event channel */=0A err =3D setup_suspend_evtchn();=0A if (err) = {=0A --=__Part8EA32D7C.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part8EA32D7C.0__=--