Douglas Anderson 1feb48baf2 kgdboc: Disable all the early code when kgdboc is a module
When kgdboc is compiled as a module all of the "ekgdboc" and
"kgdb_earlycon" code isn't useful and, in fact, breaks compilation.
This is because early_param() isn't defined for modules and that's how
this code gets configured.

It turns out that this was broken by commit eae3e19ca930 ("kgdboc:
Remove useless #ifdef CONFIG_KGDB_SERIAL_CONSOLE in kgdboc") and then
made worse by commit 220995622da5 ("kgdboc: Add kgdboc_earlycon to
support early kgdb using boot consoles").  I guess the #ifdef wasn't
so useless, even if it wasn't obvious why it was useful.  When kgdboc
was compiled as a module only "CONFIG_KGDB_SERIAL_CONSOLE_MODULE" was
defined, not "CONFIG_KGDB_SERIAL_CONSOLE".  That meant that the old
module.

Let's basically do the same thing that the old code (pre-removal of
the #ifdef) did but use "IS_BUILTIN(CONFIG_KGDB_SERIAL_CONSOLE)" to
make it more obvious what the point of the check is.  We'll fix
kgdboc_earlycon in a similar way.

Fixes: 220995622da5 ("kgdboc: Add kgdboc_earlycon to support early kgdb using boot consoles")
Fixes: eae3e19ca930 ("kgdboc: Remove useless #ifdef CONFIG_KGDB_SERIAL_CONSOLE in kgdboc")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200519084345.1.I91670accc8a5ddabab227eb63bb4ad3e2e9d2b58@changeid
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2020-06-02 15:15:45 +01:00
..
2020-04-24 21:03:57 +02:00
2020-03-23 07:59:38 +01:00
2020-04-26 11:04:15 -07:00
2020-04-24 12:44:19 -07:00
2020-04-03 15:05:35 -07:00
2020-04-21 12:27:18 -07:00
2020-04-10 11:32:22 +02:00
2020-04-23 15:51:37 -07:00
2020-04-26 11:04:15 -07:00
2020-04-24 10:20:08 -07:00
2020-04-14 11:58:04 -07:00
2020-04-04 18:07:59 -07:00
2020-04-01 18:18:18 -07:00
2020-04-16 13:52:31 -07:00
2020-03-30 11:43:51 -07:00
2020-04-08 21:03:40 -07:00
2020-04-03 15:05:35 -07:00
2020-04-26 11:17:44 -07:00
2020-03-31 16:13:09 -07:00
2020-04-03 14:25:02 -07:00
2020-04-08 21:03:40 -07:00
2020-04-10 10:06:54 -07:00
2020-03-31 10:05:01 -07:00
2020-03-30 14:58:26 -07:00
2020-04-23 09:28:15 -07:00
2020-04-17 06:05:29 -04:00
2020-04-07 19:48:52 -07:00
2020-04-21 14:21:20 +02:00
2020-04-02 15:50:04 -07:00
2020-04-03 15:05:35 -07:00
2020-03-23 08:04:08 +01:00
2020-04-20 10:19:22 -04:00
2020-04-20 10:19:22 -04:00
2020-04-07 20:24:34 -07:00
2020-04-17 10:35:17 -07:00
2020-04-03 13:12:26 -07:00
2020-04-08 10:51:53 -07:00
2020-04-08 10:51:53 -07:00