diff options
author | Raul E Rangel <rrangel@chromium.org> | 2024-09-11 12:35:14 -0600 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2024-10-01 14:11:39 +0200 |
commit | 17b655759e83fd5e28931a0ece96fa9c2ab718e7 (patch) | |
tree | c56823f042acb40abefba5e56001251da7b39bce /init | |
parent | c903327d3295b135eb8c81ebe0b68c1837718eb8 (diff) |
init: Don't proxy `console=` to earlycon
Today we are proxying the `console=` command line args to the
`param_setup_earlycon()` handler. This is done because the following are
equivalent:
console=uart[8250],mmio,<addr>[,options]
earlycon=uart[8250],mmio,<addr>[,options]
Both invocations enable an early `bootconsole`. `console=uartXXXX` is
just an alias for `earlycon=uartXXXX`.
In addition, when `earlycon=` (empty value) or just `earlycon`
(no value) is specified on the command line, we enable the earlycon
`bootconsole` specified by the SPCR table or the DT.
The problem arises when `console=` (empty value) is specified on the
command line. It's intention is to disable the `console`, but what
happens instead is that the SPRC/DT console gets enabled.
This happens because we are proxying the `console=` (empty value)
parameter to the `earlycon` handler. The `earlycon` handler then sees
that the parameter value is empty, so it enables the SPCR/DT
`bootconsole`.
This change makes it so that the `console` or `console=` parameters no
longer enable the SPCR/DT `bootconsole`. I also cleans up the hack in
`main.c` that would forward the `console` parameter to the `earlycon`
handler.
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240911123507.v2.1.Id08823b2f848237ae90ce5c5fa7e027e97c33ad3@changeid
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/init/main.c b/init/main.c index c4778edae797..00fac1170294 100644 --- a/init/main.c +++ b/init/main.c @@ -754,10 +754,7 @@ static int __init do_early_param(char *param, char *val, const struct obs_kernel_param *p; for (p = __setup_start; p < __setup_end; p++) { - if ((p->early && parameq(param, p->str)) || - (strcmp(param, "console") == 0 && - strcmp(p->str, "earlycon") == 0) - ) { + if (p->early && parameq(param, p->str)) { if (p->setup_func(val) != 0) pr_warn("Malformed early option '%s'\n", param); } |