[Skiboot] [RFC PATCH 10/12] core/console: Drop con_buf
Oliver O'Halloran
oohall at gmail.com
Tue May 19 15:46:31 AEST 2020
We can use the buffer pointer in memcons instead.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
core/console.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/core/console.c b/core/console.c
index 719ba67063a0..d37a4cb128e2 100644
--- a/core/console.c
+++ b/core/console.c
@@ -15,8 +15,6 @@
#include <processor.h>
#include <cpu.h>
-static char *con_buf = (char *)INMEM_CON_START;
-
/*
* Skiboot is both the producer and consumer of the memcons. On the consumer
* side we need to keep track of how much of the log buffer has been written
@@ -92,7 +90,7 @@ struct dt_node *add_opal_console_node(int index, const char *type,
void clear_console(void)
{
- memset(con_buf, 0, INMEM_CON_LEN);
+ memset(memcons.obuf, 0, memcons.obuf_size);
}
/*
@@ -162,7 +160,7 @@ static bool __flush_console(bool flush_to_drivers, bool need_unlock)
req = memcons.out_pos - flush_head;
unlock(&con_lock);
- len = con_driver->write(con_buf + flush_head, req);
+ len = con_driver->write(memcons.obuf + flush_head, req);
lock(&con_lock);
flush_head = (flush_head + len) % INMEM_CON_OUT_LEN;
--
2.26.2
More information about the Skiboot
mailing list