From: Greg KH <gregkh@linuxfoundation.org>
To: "zhangxiaoxu (A)" <zhangxiaoxu5@huawei.com>
Cc: linux-serial@vger.kernel.org, jirislaby@kernel.org,
robh@kernel.org, ztong0001@gmail.com, peter@hurleysoftware.com
Subject: Re: [PATCH] earlycon: Fix compile error when SERIAL_CORE is m
Date: Thu, 3 Nov 2022 03:28:47 +0100 [thread overview]
Message-ID: <Y2MnX4nlpKookDx5@kroah.com> (raw)
In-Reply-To: <74352a7a-2a3a-c26d-9687-c31eed699a4e@huawei.com>
On Thu, Oct 20, 2022 at 09:20:24PM +0800, zhangxiaoxu (A) wrote:
>
>
> On 2022/10/20 13:04, Greg KH wrote:
> > On Thu, Oct 20, 2022 at 11:27:22AM +0800, Zhang Xiaoxu wrote:
> > > When set CONFIG_SERIAL_EARLYCON=y and CONFIG_SERIAL_CORE=m, there is
> > > a compile error as below:
> > >
> > > ld: vmlinux.o: in function `parse_options.constprop.0':
> > > earlycon.c:(.init.text+0xba5a3): undefined reference to `uart_parse_earlycon'
> > >
> > > Since the SERIAL_EARLYCON use 'uart_parse_earlycon' which defined in
> > > SERIAL_CORE, so should select rather than depends on.
> >
> > No, please try to never use "select".
> >
> > >
> > > Fixes: 9aac5887595b ("tty/serial: add generic serial earlycon")
> >
> > So this has been a problem for a very very long time and never been
> > seen until now? That feels wrong, what changed to cause this to not
> > ever be hit before with all of the tens of thousands of random configs
> > that have been built since this very old kernel?
> >
> Yes, 0fb9342d06b0 ("tty: serial: earlycon dependency") already fix the
> same issue with add "depends on SERIAL_CORE".
>
> But there are some other scenarios can trigger the same issue.
>
> Use the config file in the bugzilla can reproduce the problem.
> https://bugzilla.kernel.org/show_bug.cgi?id=216611
>
> Bisect with this config, find out the following commit introduce the issue:
> cdcc41a256efe8 ("tty: serial: Kconfig: Allow SERIAL_QCOM_GENI_CONSOLE to be enabled if SERIAL_QCOM_GENI is a module")
>
> config SERIAL_QCOM_GENI
> tristate "QCOM on-chip GENI based serial port support"
> depends on ARCH_QCOM || COMPILE_TEST
> depends on QCOM_GENI_SE
> select SERIAL_CORE
>
> config SERIAL_QCOM_GENI_CONSOLE
> bool "QCOM GENI Serial Console support"
> - depends on SERIAL_QCOM_GENI=y
> + depends on SERIAL_QCOM_GENI
> select SERIAL_CORE_CONSOLE
> select SERIAL_EARLYCON
> help
> Serial console driver for Qualcomm Technologies Inc's GENI based
> QUP hardware.
Then this is an issue with that driver Kconfig options, not with the tty
core options. Please fix it up there.
thanks,
greg k-h
next prev parent reply other threads:[~2022-11-03 2:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 3:27 [PATCH] earlycon: Fix compile error when SERIAL_CORE is m Zhang Xiaoxu
2022-10-20 5:04 ` Greg KH
2022-10-20 13:20 ` zhangxiaoxu (A)
2022-11-03 2:28 ` Greg KH [this message]
2022-12-26 13:11 ` Thorsten Leemhuis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2MnX4nlpKookDx5@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=robh@kernel.org \
--cc=zhangxiaoxu5@huawei.com \
--cc=ztong0001@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).