From: Randy Dunlap <rdunlap@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Nicholas Piggin" <npiggin@gmail.com>,
linux-serial@vger.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] powerpc/legacy_serial: check CONFIG_SERIAL_8250_CONSOLE
Date: Thu, 8 Jun 2023 17:33:28 -0700 [thread overview]
Message-ID: <20230609003328.15008-1-rdunlap@infradead.org> (raw)
When SERIAL_8250_CONSOLE is not set but PPC_UDBG_16550=y,
the legacy_serial code references fsl8250_handle_irq, which is
only built when SERIAL_8250_CONSOLE is set.
Be consistent in referencing the used CONFIG_SERIAL_8250*
symbols so that the build errors do not happen.
Prevents these build errors:
powerpc-linux-ld: arch/powerpc/kernel/legacy_serial.o: in function `serial_dev_init':
legacy_serial.c:(.init.text+0x2aa): undefined reference to `fsl8250_handle_irq'
powerpc-linux-ld: legacy_serial.c:(.init.text+0x2b2): undefined reference to `fsl8250_handle_irq'
Fixes: 66eff0ef528b ("powerpc/legacy_serial: Warn about 8250 devices operated without active FSL workarounds")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/kernel/legacy_serial.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -- a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -508,9 +508,9 @@ static void __init fixup_port_irq(int in
port->irq = virq;
- if (IS_ENABLED(CONFIG_SERIAL_8250) &&
+ if (IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE) &&
of_device_is_compatible(np, "fsl,ns16550")) {
- if (IS_REACHABLE(CONFIG_SERIAL_8250)) {
+ if (IS_REACHABLE(CONFIG_SERIAL_8250_CONSOLE)) {
port->handle_irq = fsl8250_handle_irq;
port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE);
} else {
next reply other threads:[~2023-06-09 0:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 0:33 Randy Dunlap [this message]
2023-06-09 8:08 ` [PATCH] powerpc/legacy_serial: check CONFIG_SERIAL_8250_CONSOLE Uwe Kleine-König
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=20230609003328.15008-1-rdunlap@infradead.org \
--to=rdunlap@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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).