]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
parisc: pass through '\t' to early (iodc) console
authorKyle McMartin <kyle@mcmartin.ca>
Wed, 4 Aug 2010 00:38:08 +0000 (20:38 -0400)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Apr 2011 14:53:00 +0000 (16:53 +0200)
commit d9b68e5e88248bb24fd4e455588bea1d56108fd6 upstream.

The firmware handles '\t' internally, so stop trying to emulate it
(which, incidentally, had a bug in it.)

Fixes a really weird hang at bootup in rcu_bootup_announce, which,
as far as I can tell, is the first printk in the core kernel to use
a tab as the first character.

Cc: stable@kernel.org
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/parisc/kernel/firmware.c

index 7177a6cd1b7f58b0fcc83f60ea5c11cf1bd96e1a..5082a6c9ee708b666d217acf4be21ff03ce9961a 100644 (file)
@@ -1096,7 +1096,6 @@ static char __attribute__((aligned(64))) iodc_dbuf[4096];
  */
 int pdc_iodc_print(const unsigned char *str, unsigned count)
 {
-       static int posx;        /* for simple TAB-Simulation... */
        unsigned int i;
        unsigned long flags;
 
@@ -1106,19 +1105,12 @@ int pdc_iodc_print(const unsigned char *str, unsigned count)
                        iodc_dbuf[i+0] = '\r';
                        iodc_dbuf[i+1] = '\n';
                        i += 2;
-                       posx = 0;
                        goto print;
-               case '\t':
-                       while (posx & 7) {
-                               iodc_dbuf[i] = ' ';
-                               i++, posx++;
-                       }
-                       break;
                case '\b':      /* BS */
-                       posx -= 2;
+                       i--; /* overwrite last */
                default:
                        iodc_dbuf[i] = str[i];
-                       i++, posx++;
+                       i++;
                        break;
                }
        }