From: Andreas Kölbl <[email protected]>

Those variables were defined in printk.c. control.c is a better home for
them.
---
 hypervisor/arch/arm-common/dbg-write.c | 1 +
 hypervisor/control.c                   | 3 +++
 hypervisor/include/jailhouse/control.h | 3 +++
 hypervisor/include/jailhouse/printk.h  | 3 ---
 hypervisor/printk.c                    | 4 +---
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/hypervisor/arch/arm-common/dbg-write.c 
b/hypervisor/arch/arm-common/dbg-write.c
index 8de0103..c89b2df 100644
--- a/hypervisor/arch/arm-common/dbg-write.c
+++ b/hypervisor/arch/arm-common/dbg-write.c
@@ -10,6 +10,7 @@
  * the COPYING file in the top-level directory.
  */
 
+#include <jailhouse/control.h>
 #include <jailhouse/entry.h>
 #include <jailhouse/printk.h>
 #include <jailhouse/processor.h>
diff --git a/hypervisor/control.c b/hypervisor/control.c
index bdb8eae..1c53a84 100644
--- a/hypervisor/control.c
+++ b/hypervisor/control.c
@@ -33,6 +33,9 @@ struct cell root_cell;
 static DEFINE_SPINLOCK(shutdown_lock);
 static unsigned int num_cells = 1;
 
+volatile unsigned long panic_in_progress;
+unsigned long panic_cpu = -1;
+
 /**
  * CPU set iterator.
  * @param cpu          Previous CPU ID.
diff --git a/hypervisor/include/jailhouse/control.h 
b/hypervisor/include/jailhouse/control.h
index bfc5cc9..cb98456 100644
--- a/hypervisor/include/jailhouse/control.h
+++ b/hypervisor/include/jailhouse/control.h
@@ -18,6 +18,9 @@
 #define SHUTDOWN_NONE                  0
 #define SHUTDOWN_STARTED               1
 
+extern volatile unsigned long panic_in_progress;
+extern unsigned long panic_cpu;
+
 /**
  * @defgroup Control Control Subsystem
  *
diff --git a/hypervisor/include/jailhouse/printk.h 
b/hypervisor/include/jailhouse/printk.h
index c226352..fc60a55 100644
--- a/hypervisor/include/jailhouse/printk.h
+++ b/hypervisor/include/jailhouse/printk.h
@@ -12,9 +12,6 @@
 
 #include <jailhouse/types.h>
 
-extern volatile unsigned long panic_in_progress;
-extern unsigned long panic_cpu;
-
 void printk(const char *fmt, ...);
 
 void panic_printk(const char *fmt, ...);
diff --git a/hypervisor/printk.c b/hypervisor/printk.c
index 8d17a9f..61d2f7a 100644
--- a/hypervisor/printk.c
+++ b/hypervisor/printk.c
@@ -11,15 +11,13 @@
  */
 
 #include <stdarg.h>
+#include <jailhouse/control.h>
 #include <jailhouse/printk.h>
 #include <jailhouse/processor.h>
 #include <jailhouse/string.h>
 #include <asm/bitops.h>
 #include <asm/spinlock.h>
 
-volatile unsigned long panic_in_progress;
-unsigned long panic_cpu = -1;
-
 static DEFINE_SPINLOCK(printk_lock);
 
 #define console_write(msg)     arch_dbg_write(msg)
-- 
2.10.0

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to