From: "Jan Beulich" Subject: [PATCH] linux-2.6.18: utilize SYS_HYPERVISOR config option Date: Wed, 20 Jun 2007 07:35:53 +0100 Message-ID: <4678E6E9.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline 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 Signed-off-by: Jan Beulich Index: head-2007-05-31/drivers/xen/Kconfig =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-05-31.orig/drivers/xen/Kconfig 2007-06-06 17:04:59.0000000= 00 +0200 +++ head-2007-05-31/drivers/xen/Kconfig 2007-06-04 13:48:38.000000000 = +0200 @@ -216,6 +216,7 @@ config XEN_DISABLE_SERIAL config XEN_SYSFS tristate "Export Xen attributes in sysfs" depends on SYSFS + select SYS_HYPERVISOR default y help Xen hypervisor attributes will show up under /sys/hypervisor/. Index: head-2007-05-31/drivers/xen/core/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-05-31.orig/drivers/xen/core/Makefile 2007-06-06 = 17:04:59.000000000 +0200 +++ head-2007-05-31/drivers/xen/core/Makefile 2007-06-04 13:55:09.0000000= 00 +0200 @@ -5,7 +5,7 @@ obj-y :=3D evtchn.o gnttab.o features.o reboot.o machine_reboot.o =20 obj-$(CONFIG_PROC_FS) +=3D xen_proc.o -obj-$(CONFIG_SYSFS) +=3D hypervisor_sysfs.o +obj-$(CONFIG_SYS_HYPERVISOR) +=3D hypervisor_sysfs.o obj-$(CONFIG_HOTPLUG_CPU) +=3D cpu_hotplug.o obj-$(CONFIG_XEN_SYSFS) +=3D xen_sysfs.o obj-$(CONFIG_XEN_SMPBOOT) +=3D smpboot.o Index: head-2007-05-31/drivers/xen/core/hypervisor_sysfs.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-05-31.orig/drivers/xen/core/hypervisor_sysfs.c 2007-06-06 = 17:04:59.000000000 +0200 +++ head-2007-05-31/drivers/xen/core/hypervisor_sysfs.c 2007-06-04 = 13:57:46.000000000 +0200 @@ -12,8 +12,6 @@ #include #include =20 -decl_subsys(hypervisor, NULL, NULL); - static ssize_t hyp_sysfs_show(struct kobject *kobj, struct attribute *attr, char *buffer) @@ -37,7 +35,7 @@ static ssize_t hyp_sysfs_store(struct ko return 0; } =20 -struct sysfs_ops hyp_sysfs_ops =3D { +static struct sysfs_ops hyp_sysfs_ops =3D { .show =3D hyp_sysfs_show, .store =3D hyp_sysfs_store, }; @@ -52,8 +50,7 @@ static int __init hypervisor_subsys_init return -ENODEV; =20 hypervisor_subsys.kset.kobj.ktype =3D &hyp_sysfs_kobj_type; - return subsystem_register(&hypervisor_subsys); + return 0; } =20 device_initcall(hypervisor_subsys_init); -EXPORT_SYMBOL_GPL(hypervisor_subsys); Index: head-2007-05-31/include/xen/hypervisor_sysfs.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-05-31.orig/include/xen/hypervisor_sysfs.h 2007-06-06 = 17:04:59.000000000 +0200 +++ head-2007-05-31/include/xen/hypervisor_sysfs.h 2007-06-04 = 13:43:51.000000000 +0200 @@ -20,8 +20,6 @@ static struct hyp_sysfs_attr _name##_at static struct hyp_sysfs_attr _name##_attr =3D \ __ATTR(_name, 0644, _name##_show, _name##_store) =20 -extern struct subsystem hypervisor_subsys; - struct hyp_sysfs_attr { struct attribute attr; ssize_t (*show)(struct hyp_sysfs_attr *, char *);