android_kernel_xiaomi_sm8350/arch
Gerd Hoffmann 69331af79c Fixes and cleanups for earlyprintk aka boot console
The console subsystem already has an idea of a boot console, using the
CON_BOOT flag.  The implementation has some flaws though.  The major
problem is that presence of a boot console makes register_console() ignore
any other console devices (unless explicitly specified on the kernel
command line).

This patch fixes the console selection code to *not* consider a boot
console a full-featured one, so the first non-boot console registering will
become the default console instead.  This way the unregister call for the
boot console in the register_console() function actually triggers and the
handover from the boot console to the real console device works smoothly.
Added a printk for the handover, so you know which console device the
output goes to when the boot console stops printing messages.

The disable_early_printk() call is obsolete with that patch, explicitly
disabling the early console isn't needed any more as it works automagically
with that patch.

I've walked through the tree, dropped all disable_early_printk() instances
found below arch/ and tagged the consoles with CON_BOOT if needed.  The
code is tested on x86, sh (thanks to Paul) and mips (thanks to Ralf).

Changes to last version: Rediffed against -rc3, adapted to mips cleanups by
Ralf, fixed "udbg-immortal" cmd line arg on powerpc.

Signed-off-by: Gerd Hoffmann <kraxel@exsuse.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:04 -07:00
..
alpha Fixes and cleanups for earlyprintk aka boot console 2007-05-08 11:15:04 -07:00
arm get_unmapped_area handles MAP_FIXED on arm 2007-05-07 12:12:56 -07:00
arm26 use SLAB_PANIC flag cleanup 2007-05-08 11:14:57 -07:00
avr32 AVR32: Remove useless config option "GENERIC_BUST_SPINLOCK". 2007-04-27 13:45:26 +02:00
blackfin blackfin architecture 2007-05-07 12:12:58 -07:00
cris CRIS: remove code related to pre-2.2 kernel 2007-05-07 12:13:00 -07:00
frv kconfig: centralize the selection of semaphore debugging in lib/Kconfig.debug 2007-05-08 11:15:00 -07:00
h8300 h8300: add zImage support 2007-05-07 12:12:58 -07:00
i386 ipmi: add new IPMI nmi watchdog handling 2007-05-08 11:14:58 -07:00
ia64 use SLAB_PANIC flag cleanup 2007-05-08 11:14:57 -07:00
m32r [PATCH] x86: Allow percpu variables to be page-aligned 2007-05-02 19:27:12 +02:00
m68k SPIN_LOCK_UNLOCKED cleanup in arch/m68k 2007-05-07 12:12:59 -07:00
m68knommu PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
mips Fixes and cleanups for earlyprintk aka boot console 2007-05-08 11:15:04 -07:00
parisc get_unmapped_area handles MAP_FIXED on parisc 2007-05-07 12:12:56 -07:00
powerpc Fixes and cleanups for earlyprintk aka boot console 2007-05-08 11:15:04 -07:00
ppc Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 2007-05-05 14:55:20 -07:00
s390 simplify the stacktrace code 2007-05-08 11:14:58 -07:00
sh Fixes and cleanups for earlyprintk aka boot console 2007-05-08 11:15:04 -07:00
sh64 Fixes and cleanups for earlyprintk aka boot console 2007-05-08 11:15:04 -07:00
sparc [SPARC]: Fix comment typo in smp4m_blackbox_current(). 2007-05-06 22:43:46 -07:00
sparc64 simplify the stacktrace code 2007-05-08 11:14:58 -07:00
um uml: an idle system should have zero load average 2007-05-08 11:14:57 -07:00
v850 v850: generic timekeeping conversion 2007-05-07 12:13:04 -07:00
x86_64 Fixes and cleanups for earlyprintk aka boot console 2007-05-08 11:15:04 -07:00
xtensa xtensa: strlcpy is smart enough 2007-05-07 12:13:04 -07:00