diff mbox series

[RFC,10/12] core/console: Drop con_buf

Message ID 20200519054633.113238-11-oohall@gmail.com
State RFC
Headers show
Series [RFC,01/12] platform/mambo: Add a mambo OPAL console driver | expand

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (0f1937ef40fca0c3212a9dff1010b832a24fb063)

Commit Message

Oliver O'Halloran May 19, 2020, 5:46 a.m. UTC
We can use the buffer pointer in memcons instead.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 core/console.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

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;