Horms
2006-Jun-16 07:50 UTC
[Xen-devel] [PATCH 0/4] Allow compilation without CONFIG_PROC_FS
I stumbled across a couple of build problems when compiling Xen without CONFIG_PROC_FS. My proposed fixes follow. Though it may be that one or more of the peices of functionaly breaks xen in which case I guess that CONFIG_XEN should turn on CONFIG_PROC_FS. -- Horms -- Horms http://www.vergenet.net/~horms/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Horms
2006-Jun-16 07:50 UTC
[Xen-devel] [PATCH 1/4] balloon: the balloon driver''s proc entry needs CONFIG_PROC_FS
balloon: the balloon driver''s proc entry needs CONFIG_PROC_FS
CONFIG_PROC_FS is needed in order to compile the proc entry portion
of the baloon driver. I believe that the rest of the driver is still
fully functional with this change.
Signed-Off-By: Horms <horms@verge.net.au>
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c | 6 ++++++
1 file changed, 6 insertions(+)
--- x/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
+++ x/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
@@ -58,7 +58,9 @@
#define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10))
+#ifdef CONFIG_PROC_FS
static struct proc_dir_entry *balloon_pde;
+#endif
static DECLARE_MUTEX(balloon_mutex);
@@ -403,6 +405,7 @@ static int balloon_init_watcher(struct n
return NOTIFY_DONE;
}
+#ifdef CONFIG_PROC_FS
static int balloon_write(struct file *file, const char __user *buffer,
unsigned long count, void *data)
{
@@ -456,6 +459,7 @@ static int balloon_read(char *page, char
*eof = 1;
return len;
}
+#endif
static struct notifier_block xenstore_notifier;
@@ -481,6 +485,7 @@ static int __init balloon_init(void)
balloon_timer.data = 0;
balloon_timer.function = balloon_alarm;
+#ifdef CONFIG_PROC_FS
if ((balloon_pde = create_xen_proc_entry("balloon", 0644)) == NULL)
{
WPRINTK("Unable to create /proc/xen/balloon.\n");
return -1;
@@ -488,6 +493,7 @@ static int __init balloon_init(void)
balloon_pde->read_proc = balloon_read;
balloon_pde->write_proc = balloon_write;
+#endif
/* Initialise the balloon with excess memory space. */
for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {
--
Horms http://www.vergenet.net/~horms/
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Horms
2006-Jun-16 07:51 UTC
[Xen-devel] [PATCH 2/4] xenbus: CONFIG_PROC_FS is required for the xenbus''s privcmd
xenbus: CONFIG_PROC_FS is required for the xenbus''s privcmd
It does not appear that any of the functionality of xenbus'' privcmd
can be provided without CONFIG_PROC_FS
Signed-Off-By: Horms <horms@verge.net.au>
linux-2.6-xen-sparse/drivers/xen/Kconfig | 5 +++++
linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
--- x/linux-2.6-xen-sparse/drivers/xen/Kconfig
+++ x/linux-2.6-xen-sparse/drivers/xen/Kconfig
@@ -28,6 +28,11 @@ config XEN_UNPRIVILEGED_GUEST
bool
default !XEN_PRIVILEGED_GUEST
+config XEN_PRIVCMD
+ bool
+ depends on PROC_FS
+ default y
+
config XEN_BACKEND
tristate "Backend driver support"
default y
--- x/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile
+++ x/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile
@@ -1,2 +1,2 @@
-obj-y := privcmd.o
+obj-$(CONFIG_XEN_PRIVCMD) := privcmd.o
--
Horms http://www.vergenet.net/~horms/
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Horms
2006-Jun-16 07:51 UTC
[Xen-devel] [PATCH 3/4] xenbus: CONFIG_PROC_FS is required for the xenbus device
xenbus: CONFIG_PROC_FS is required for the xenbus device
It does not appear that any of the functionality of xenbus_dev
can be provided without CONFIG_PROC_FS
Signed-Off-By: Horms <horms@verge.net.au>
linux-2.6-xen-sparse/drivers/xen/Kconfig | 5 +++++
linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
--- x/linux-2.6-xen-sparse/drivers/xen/Kconfig
+++ x/linux-2.6-xen-sparse/drivers/xen/Kconfig
@@ -84,6 +89,11 @@ config XEN_BLKDEV_BACKEND
block devices to other guests via a high-performance shared-memory
interface.
+config XEN_XENBUS_DEV
+ bool
+ depends on PROC_FS
+ default y
+
config XEN_NETDEV_BACKEND
tristate "Network-device backend driver"
depends on XEN_BACKEND && NET
--- x/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile
+++ x/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile
@@ -9,4 +9,4 @@ xenbus-objs += xenbus_client.o
xenbus-objs += xenbus_comms.o
xenbus-objs += xenbus_xs.o
xenbus-objs += xenbus_probe.o
-xenbus-objs += xenbus_dev.o
+obj-$(CONFIG_XEN_XENBUS_DEV) += xenbus_dev.o
--
Horms http://www.vergenet.net/~horms/
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Horms
2006-Jun-16 07:51 UTC
[Xen-devel] [PATCH 4/4] xenbus: CONFIG_PROC_FS is needed for xenbus_probe''s proc entry
xenbus: CONFIG_PROC_FS is needed for xenbus_probe''s proc entry
Without CONFIG_PROC_FS, xenbus_probe cannot provide a proc entry,
however the rest of its functionality appears to be unaffected.
Signed-Off-By: Horms <horms@verge.net.au>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c | 4 ++++
1 file changed, 4 insertions(+)
--- x/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
+++ x/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
@@ -926,6 +926,7 @@ void xenbus_probe(void *unused)
}
+#ifdef CONFIG_PROC_FS
static struct file_operations xsd_kva_fops;
static struct proc_dir_entry *xsd_kva_intf;
static struct proc_dir_entry *xsd_port_intf;
@@ -964,6 +965,7 @@ static int xsd_port_read(char *page, cha
*eof = 1;
return len;
}
+#endif
static int __init xenbus_probe_init(void)
@@ -1008,6 +1010,7 @@ static int __init xenbus_probe_init(void
BUG_ON(err);
xen_start_info->store_evtchn = alloc_unbound.port;
+#ifdef CONFIG_PROC_FS
/* And finally publish the above info in /proc/xen */
xsd_kva_intf = create_xen_proc_entry("xsd_kva", 0600);
if (xsd_kva_intf) {
@@ -1020,6 +1023,7 @@ static int __init xenbus_probe_init(void
xsd_port_intf = create_xen_proc_entry("xsd_port", 0400);
if (xsd_port_intf)
xsd_port_intf->read_proc = xsd_port_read;
+#endif
} else
xenstored_ready = 1;
--
Horms http://www.vergenet.net/~horms/
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel