[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MINI-OS PATCH 5/6] xenbus: drop parameter from get_xenbus()



The parameter of get_xenbus() is used only when running in PV mode,
and it always has the same value.

Drop the parameter and use start_info_ptr directly in the PV variant
of get_xenbus().

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 arch/arm/setup.c |  2 +-
 arch/x86/setup.c |  2 +-
 include/xenbus.h |  4 ++--
 xenbus.c         | 13 +++++--------
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/arch/arm/setup.c b/arch/arm/setup.c
index 161d137d..e918a064 100644
--- a/arch/arm/setup.c
+++ b/arch/arm/setup.c
@@ -41,7 +41,7 @@ void arch_init(void *dtb_pointer, uint32_t physical_offset)
     HYPERVISOR_shared_info = map_shared_info();
 
     get_console();
-    get_xenbus(NULL);
+    get_xenbus();
 
     gic_init();
 
diff --git a/arch/x86/setup.c b/arch/x86/setup.c
index 2b314aa2..590f51a8 100644
--- a/arch/x86/setup.c
+++ b/arch/x86/setup.c
@@ -194,7 +194,7 @@ arch_init(void *par)
        /* WARN: don't do printk before here, it uses information from
           shared_info. Use xprintk instead. */
        get_console();
-       get_xenbus(par);
+       get_xenbus();
        get_cmdline(par);
 
        /* Grab the shared_info pointer and put it in a safe place. */
diff --git a/include/xenbus.h b/include/xenbus.h
index 542ee456..21da05e2 100644
--- a/include/xenbus.h
+++ b/include/xenbus.h
@@ -12,7 +12,7 @@ extern struct xenstore_domain_interface *xenstore_buf;
 
 /* Initialize the XenBus system. */
 void init_xenbus(void);
-void get_xenbus(void *p);
+void get_xenbus(void);
 #else
 #define xenbus_evtchn ~0
 #define xenstore_buf NULL
@@ -20,7 +20,7 @@ void get_xenbus(void *p);
 static inline void init_xenbus(void)
 {
 }
-static inline void get_xenbus(void *p)
+static inline void get_xenbus(void)
 {
 }
 #endif
diff --git a/xenbus.c b/xenbus.c
index 43fdebd7..8225ed4b 100644
--- a/xenbus.c
+++ b/xenbus.c
@@ -74,15 +74,15 @@ uint32_t xenbus_evtchn;
 EXPORT_SYMBOL(xenbus_evtchn);
 
 #ifdef CONFIG_PARAVIRT
-void get_xenbus(void *p)
+void get_xenbus(void)
 {
-    start_info_t *si = p;
+    start_info_t *si = start_info_ptr;
 
     xenbus_evtchn = si->store_evtchn;
     xenstore_buf = mfn_to_virt(si->store_mfn);
 }
 #else
-void get_xenbus(void *p)
+void get_xenbus(void)
 {
     uint64_t v;
 
@@ -468,11 +468,8 @@ void resume_xenbus(int canceled)
     struct write_req req[2];
     struct xsd_sockmsg *rep;
 
-#ifdef CONFIG_PARAVIRT
-    get_xenbus(start_info_ptr);
-#else
-    get_xenbus(0);
-#endif
+    get_xenbus();
+
     unmask_evtchn(xenbus_evtchn);
 
     if ( !canceled )
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.