[Skiboot] [PATCH v2 01/14] console: don't use __flush_to_console() outside console.c
Oliver O'Halloran
oohall at gmail.com
Tue Dec 20 17:03:32 AEDT 2016
There is only one use of this function outside of console.c and that
usage is broken. As the name suggests this is an internal function that
is only safe when the console lock held is held. flush_console() will
aquire the lock for the caller so that should be used instead.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
core/console.c | 2 +-
hw/fsp/fsp-console.c | 2 +-
include/console.h | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/core/console.c b/core/console.c
index f76ed402c48f..0e96bf4593eb 100644
--- a/core/console.c
+++ b/core/console.c
@@ -114,7 +114,7 @@ void clear_console(void)
* Optionally can skip flushing to drivers, leaving messages
* just in memory console.
*/
-bool __flush_console(bool flush_to_drivers)
+static bool __flush_console(bool flush_to_drivers)
{
struct cpu_thread *cpu = this_cpu();
size_t req, len = 0;
diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index 0080d7326f50..46ac28bbd822 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -751,7 +751,7 @@ void fsp_console_poll(void *data __unused)
continue;
}
if (fs->log_port) {
- __flush_console(true);
+ flush_console();
opal_update_pending_evt(fs->irq, 0);
} else {
#ifdef OPAL_DEBUG_CONSOLE_POLL
diff --git a/include/console.h b/include/console.h
index 5cb1227e21bd..f88547c7791e 100644
--- a/include/console.h
+++ b/include/console.h
@@ -59,7 +59,6 @@ extern struct lock con_lock;
extern bool dummy_console_enabled(void);
extern void force_dummy_console(void);
extern bool flush_console(void);
-extern bool __flush_console(bool flush_to_drivers);
extern void set_console(struct con_ops *driver);
extern void console_complete_flush(void);
--
2.7.4
More information about the Skiboot
mailing list