To avoid name clashes in future, as jailhouse_debug_console will be
renamed to jailhouse_console.

Signed-off-by: Ralf Ramsauer <[email protected]>
---
 driver/main.c                         | 16 ++++++++--------
 hypervisor/include/jailhouse/header.h |  2 +-
 hypervisor/include/jailhouse/printk.h |  2 +-
 hypervisor/printk.c                   |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/driver/main.c b/driver/main.c
index 7b89425d..cb889694 100644
--- a/driver/main.c
+++ b/driver/main.c
@@ -94,7 +94,7 @@ static struct device *jailhouse_dev;
 static unsigned long hv_core_and_percpu_size;
 static atomic_t call_done;
 static int error_code;
-static struct jailhouse_console* volatile console_page;
+static struct jailhouse_ringbuf* volatile console_page;
 static bool console_available;
 static struct resource *hypervisor_mem_res;
 
@@ -124,7 +124,7 @@ static typeof(__hyp_stub_vectors) *__hyp_stub_vectors_sym;
 static struct {
        bool valid;
        unsigned int id;
-       struct jailhouse_console page;
+       struct jailhouse_ringbuf page;
 } last_console;
 
 #ifdef CONFIG_X86
@@ -140,7 +140,7 @@ static void init_hypercall(void)
 }
 #endif
 
-static void copy_console_page(struct jailhouse_console *dst)
+static void copy_console_page(struct jailhouse_ringbuf *dst)
 {
        unsigned int tail;
 
@@ -152,7 +152,7 @@ static void copy_console_page(struct jailhouse_console *dst)
                rmb();
 
                /* copy console page */
-               memcpy(dst, console_page, sizeof(struct jailhouse_console));
+               memcpy(dst, console_page, sizeof(struct jailhouse_ringbuf));
                rmb();
        } while (console_page->tail != tail || console_page->busy);
 }
@@ -258,7 +258,7 @@ static inline const char * jailhouse_get_fw_name(void)
 #endif
 }
 
-static int __jailhouse_console_dump_delta(struct jailhouse_console *console,
+static int __jailhouse_console_dump_delta(struct jailhouse_ringbuf *console,
                                          char *dst, unsigned int head,
                                          unsigned int *miss)
 {
@@ -312,7 +312,7 @@ int jailhouse_console_dump_delta(char *dst, unsigned int 
head,
                                 unsigned int *miss)
 {
        int ret;
-       struct jailhouse_console *console;
+       struct jailhouse_ringbuf *console;
 
        if (!jailhouse_enabled)
                return -EAGAIN;
@@ -320,7 +320,7 @@ int jailhouse_console_dump_delta(char *dst, unsigned int 
head,
        if (!console_available)
                return -EPERM;
 
-       console = kmalloc(sizeof(struct jailhouse_console), GFP_KERNEL);
+       console = kmalloc(sizeof(struct jailhouse_ringbuf), GFP_KERNEL);
        if (console == NULL)
                return -ENOMEM;
 
@@ -458,7 +458,7 @@ static int jailhouse_cmd_enable(struct jailhouse_system 
__user *arg)
                goto error_release_memreg;
        }
 
-       console_page = (struct jailhouse_console*)
+       console_page = (struct jailhouse_ringbuf*)
                (hypervisor_mem + header->console_page);
        last_console.valid = false;
 
diff --git a/hypervisor/include/jailhouse/header.h 
b/hypervisor/include/jailhouse/header.h
index 45c69ea9..57d257f8 100644
--- a/hypervisor/include/jailhouse/header.h
+++ b/hypervisor/include/jailhouse/header.h
@@ -31,7 +31,7 @@
  */
 typedef int (*jailhouse_entry)(unsigned int);
 
-struct jailhouse_console {
+struct jailhouse_ringbuf {
        unsigned int busy;
        unsigned int tail;
        /* current implementation requires the size of the content to be a
diff --git a/hypervisor/include/jailhouse/printk.h 
b/hypervisor/include/jailhouse/printk.h
index e775e975..2c03e0ab 100644
--- a/hypervisor/include/jailhouse/printk.h
+++ b/hypervisor/include/jailhouse/printk.h
@@ -29,4 +29,4 @@ void arch_dbg_write_init(void);
 extern void (*arch_dbg_write)(const char *msg);
 
 extern bool virtual_console;
-extern volatile struct jailhouse_console console;
+extern volatile struct jailhouse_ringbuf console;
diff --git a/hypervisor/printk.c b/hypervisor/printk.c
index 1cc35510..631afb1e 100644
--- a/hypervisor/printk.c
+++ b/hypervisor/printk.c
@@ -19,7 +19,7 @@
 #include <asm/spinlock.h>
 
 bool virtual_console = false;
-volatile struct jailhouse_console console __attribute__((section(".console")));
+volatile struct jailhouse_ringbuf console __attribute__((section(".console")));
 
 static DEFINE_SPINLOCK(printk_lock);
 
-- 
2.17.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