]> git.ipfire.org Git - people/arne_f/kernel.git/commit
kgdb: Make "kgdbcon" work properly with "kgdb_earlycon"
authorDouglas Anderson <dianders@chromium.org>
Tue, 30 Jun 2020 22:14:38 +0000 (15:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 09:22:13 +0000 (10:22 +0100)
commit747ba0eab55f7b47c829b7eec89788b62df7c741
tree5b1c4c550de1df68b06de564514563a1e50aeb46
parentae6df24b20047eb39cb6cfe35779de00b51cea46
kgdb: Make "kgdbcon" work properly with "kgdb_earlycon"

[ Upstream commit b18b099e04f450cdc77bec72acefcde7042bd1f3 ]

On my system the kernel processes the "kgdb_earlycon" parameter before
the "kgdbcon" parameter.  When we setup "kgdb_earlycon" we'll end up
in kgdb_register_callbacks() and "kgdb_use_con" won't have been set
yet so we'll never get around to starting "kgdbcon".  Let's remedy
this by detecting that the IO module was already registered when
setting "kgdb_use_con" and registering the console then.

As part of this, to avoid pre-declaring things, move the handling of
the "kgdbcon" further down in the file.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200630151422.1.I4aa062751ff5e281f5116655c976dff545c09a46@changeid
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/debug/debug_core.c