OPAL console IO should avoid locks and complexity where possible, to
maximise the chance of it working if there are crashes or bugs. This
poll is not necessary, opal_console_read can handle no input.

In a future patch, Linux will provide a console service to OPAL via the
OPAL console, so it must avoid using any other OPAL calls in this path.

Signed-off-by: Nicholas Piggin <npig...@gmail.com>
---
 arch/powerpc/platforms/powernv/opal.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal.c 
b/arch/powerpc/platforms/powernv/opal.c
index 1bf2e0b31ecf..e8eba210a92d 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -467,13 +467,10 @@ static int __init opal_message_init(struct device_node 
*opal_node)
 int opal_get_chars(uint32_t vtermno, char *buf, int count)
 {
        s64 rc;
-       __be64 evt, len;
+       __be64 len;
 
        if (!opal.entry)
                return -ENODEV;
-       opal_poll_events(&evt);
-       if ((be64_to_cpu(evt) & OPAL_EVENT_CONSOLE_INPUT) == 0)
-               return 0;
        len = cpu_to_be64(count);
        rc = opal_console_read(vtermno, &len, buf);
        if (rc == OPAL_SUCCESS)
-- 
2.23.0

Reply via email to