# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 7db8ef0e440a72999a4a79c038309a52643b46e7
# Parent 5eead9930294f699f8feb9f7f5b157cb9c607b69
Add prototype for balloon_init_watcher.
Also cleanup balloon_init_watcher whitespace.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
diff -r 5eead9930294 -r 7db8ef0e440a
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Tue Aug 2
18:04:28 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Tue Aug 2
19:04:13 2005
@@ -84,9 +84,6 @@
/* Flag for dom0 xenstore workaround */
static int balloon_xenbus_init=0;
-/* Init Function */
-void balloon_init_watcher(void);
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
/* Use the private and mapping fields of struct page as a list. */
#define PAGE_TO_LIST(p) ( (struct list_head *)&p->private )
@@ -354,27 +351,21 @@
}
-/*
- Try to set up our watcher, if not already set
-
-*/
-void balloon_init_watcher(void)
+/* Init Function - Try to set up our watcher, if not already set. */
+void balloon_init_watcher(void)
{
int err;
- if(!xen_start_info.store_evtchn)
- {
+ if (!xen_start_info.store_evtchn) {
IPRINTK("Delaying watcher init until xenstore is available\n");
return;
}
down(&xenbus_lock);
- if(! balloon_xenbus_init)
- {
+ if (!balloon_xenbus_init) {
err = register_xenbus_watch(&xb_watch);
- if(err)
- {
+ if (err) {
/* BIG FAT FIXME: dom0 sequencing workaround
* dom0 can't set a watch on memory/target until
* after the tools create it. So, we have to watch
@@ -384,16 +375,13 @@
* non-existant keys
*/
register_xenbus_watch(&root_watch);
- }
- else
- {
+ } else {
IPRINTK("Balloon xenbus watcher initialized\n");
balloon_xenbus_init = 1;
}
}
up(&xenbus_lock);
-
}
EXPORT_SYMBOL(balloon_init_watcher);
diff -r 5eead9930294 -r 7db8ef0e440a
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Tue Aug 2
18:04:28 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Tue Aug 2
19:04:13 2005
@@ -29,6 +29,7 @@
#include <asm-xen/hypervisor.h>
#include <asm-xen/xenbus.h>
+#include <asm-xen/balloon.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/string.h>
diff -r 5eead9930294 -r 7db8ef0e440a
linux-2.6-xen-sparse/include/asm-xen/balloon.h
--- a/linux-2.6-xen-sparse/include/asm-xen/balloon.h Tue Aug 2 18:04:28 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/balloon.h Tue Aug 2 19:04:13 2005
@@ -48,4 +48,7 @@
#define balloon_lock(__flags) spin_lock_irqsave(&balloon_lock, __flags)
#define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
+/* Init Function - Try to set up our watcher, if not already set. */
+void balloon_init_watcher(void);
+
#endif /* __ASM_BALLOON_H__ */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|