tty: hvc: remove unexplained "just in case" spin delay
authorNicholas Piggin <npiggin@gmail.com>
Mon, 30 Apr 2018 14:55:52 +0000 (00:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 Jul 2018 12:09:58 +0000 (22:09 +1000)
This delay was in the very first OPAL console commit 6.5 years ago,
and came from the vio hvc driver. The firmware console has hardened
sufficiently to remove it.

Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/tty/hvc/hvc_opal.c

index 810fd42904c3d45388d6817fa85b2b58095660b5..f631f8bee308846d1cab8fe73ac89e4d8953d7f7 100644 (file)
@@ -313,14 +313,8 @@ static int udbg_opal_getc(void)
        int ch;
        for (;;) {
                ch = udbg_opal_getc_poll();
-               if (ch == -1) {
-                       /* This shouldn't be needed...but... */
-                       volatile unsigned long delay;
-                       for (delay=0; delay < 2000000; delay++)
-                               ;
-               } else {
+               if (ch != -1)
                        return ch;
-               }
        }
 }