From: Randy Dunlap <rdunlap@infradead.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>
Cc: Rob Herring <robh@kernel.org>, Liang He <windhl@126.com>,
linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
kernel@pengutronix.de, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v4 1/2] powerpc/legacy_serial: Handle SERIAL_8250_FSL=n build failures
Date: Fri, 9 Jun 2023 20:03:42 -0700 [thread overview]
Message-ID: <aa8fecb1-d5e7-c7c6-a8ad-789fc0627e57@infradead.org> (raw)
In-Reply-To: <20230609133932.786117-2-u.kleine-koenig@pengutronix.de>
On 6/9/23 06:39, Uwe Kleine-König wrote:
> With SERIAL_8250=y and SERIAL_8250_FSL_CONSOLE=n the both
> IS_ENABLED(CONFIG_SERIAL_8250) and IS_REACHABLE(CONFIG_SERIAL_8250)
> evaluate to true and so fsl8250_handle_irq() is used. However this
> function is only available if CONFIG_SERIAL_8250_CONSOLE=y (and thus
> SERIAL_8250_FSL=y).
>
> To prepare SERIAL_8250_FSL becoming tristate and being enabled in more
> cases, check for IS_REACHABLE(CONFIG_SERIAL_8250_FSL) before making use
> of fsl8250_handle_irq(). This check is correct with and without the
> change to make SERIAL_8250_FSL modular.
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: 66eff0ef528b ("powerpc/legacy_serial: Warn about 8250 devices operated without active FSL workarounds")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thanks.
> ---
> arch/powerpc/kernel/legacy_serial.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
> index fdbd85aafeb1..6ee65741dbd5 100644
> --- a/arch/powerpc/kernel/legacy_serial.c
> +++ b/arch/powerpc/kernel/legacy_serial.c
> @@ -510,7 +510,7 @@ static void __init fixup_port_irq(int index,
>
> if (IS_ENABLED(CONFIG_SERIAL_8250) &&
> of_device_is_compatible(np, "fsl,ns16550")) {
> - if (IS_REACHABLE(CONFIG_SERIAL_8250)) {
> + if (IS_REACHABLE(CONFIG_SERIAL_8250_FSL)) {
> port->handle_irq = fsl8250_handle_irq;
> port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE);
> } else {
--
~Randy
prev parent reply other threads:[~2023-06-10 3:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 13:39 [PATCH v4 0/2] serial: 8250: Apply FSL workarounds also without SERIAL_8250_CONSOLE Uwe Kleine-König
2023-06-09 13:39 ` [PATCH v4 1/2] powerpc/legacy_serial: Handle SERIAL_8250_FSL=n build failures Uwe Kleine-König
2023-06-10 3:03 ` Randy Dunlap [this message]
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=aa8fecb1-d5e7-c7c6-a8ad-789fc0627e57@infradead.org \
--to=rdunlap@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=windhl@126.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).