Message ID | 20200502111914.166578-5-npiggin@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | OPAL V4 | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (1bc92fe3175eb26ff37e580c0383d7a9abe06835) |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 14 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
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)
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 <npiggin@gmail.com> --- arch/powerpc/platforms/powernv/opal.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)