]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
m68k: Don't unregister boot console needlessly
authorFinn Thain <fthain@linux-m68k.org>
Tue, 1 Apr 2025 00:26:44 +0000 (11:26 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:04:57 +0000 (12:04 +0200)
commit803538f998013caf56f158ea5de8466fa0bfed93
treee5d9499170cef162788f3f77637c2f5aeddbd33b
parent76c1ce491d794a170b3971014d25d642461d5f53
m68k: Don't unregister boot console needlessly

[ Upstream commit 83f672a7f69ec38b1bbb27221e342937f68c11c7 ]

When MACH_IS_MVME147, the boot console calls mvme147_scc_write() to
generate console output. That will continue to work even after
debug_cons_nputs() becomes unavailable so there's no need to
unregister the boot console.

Take the opportunity to remove a repeated MACH_IS_* test. Use the
actual .write method (instead of a wrapper) and test that pointer
instead. This means adding an unused parameter to debug_cons_nputs() for
consistency with the struct console API.

early_printk.c is only built when CONFIG_EARLY_PRINTK=y. As of late,
head.S is only built when CONFIG_MMU_MOTOROLA=y. So let the former symbol
depend on the latter, to obviate some ifdef conditionals.

Cc: Daniel Palmer <daniel@0x0f.com>
Fixes: 077b33b9e283 ("m68k: mvme147: Reinstate early console")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/d1d4328e5aa9a87bd8352529ce62b767731c0530.1743467205.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/m68k/Kconfig.debug
arch/m68k/kernel/early_printk.c
arch/m68k/kernel/head.S