Linux Serial subsystem development
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: kernel@pengutronix.de,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Johan Hovold <johan@kernel.org>,
	linux-serial <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v2] serial: 8250: Apply FSL workarounds also without SERIAL_8250_CONSOLE
Date: Wed, 31 May 2023 13:09:01 +0300 (EEST)	[thread overview]
Message-ID: <9eab900-9387-4db2-3f24-29d4d1dcb411@linux.intel.com> (raw)
In-Reply-To: <20230531100443.jeg4q73fz4yx4pi6@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2763 bytes --]

On Wed, 31 May 2023, Uwe Kleine-König wrote:

> On Wed, May 31, 2023 at 12:47:54PM +0300, Ilpo Järvinen wrote:
> > On Wed, 31 May 2023, Uwe Kleine-König wrote:
> > 
> > > The need to handle the FSL variant of 8250 in a special way is also
> > > present without console support. So soften the dependency for
> > > SERIAL_8250_FSL accordingly.
> > > 
> > > This issue was identified by Dominik Andreas Schorpp.
> > > 
> > > To cope for CONFIG_SERIAL_8250=m + CONFIG_SERIAL_8250_FSL=y, 8250_fsl.o
> > > must be put in the same compilation unit as 8250_port.o because the
> > > latter defines some functions needed in the former and so 8250_fsl.o
> > > must not be built-in if 8250_port.o is available in a module.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > > Hello,
> > > 
> > > (implicit) v1 was already applied by Greg (a0807ca158e0 in tty-testing)
> > > but that didn't handle CONFIG_SERIAL_8250=m + CONFIG_SERIAL_8250_FSL=y
> > > correctly which was pointed out by the 0-day bot. (Thanks!)
> > 
> > That would warrant Reported-by (0-day's reports give you the tag).
> 
> I'd add this tag if I created a commit that fixes the broken commit.
> However I understood that if a v2 patch fixes a v1 that was broken, the
> tag is not to be added?! I don't feel strong here however, so if people
> agree that the tag should be there, I can add it.
> 
> > > That wasn't a problem before because SERIAL_8250_CONSOLE depends on
> > > SERIAL_8250=y.
> > > 
> > > Having said that I wonder if there are a few more .o files that should
> > > better be used with 8250_base-$(CONFIG_SERIAL_8250_XXX) instead of
> > > obj-$(CONFIG_SERIAL_8250_XXX).
> > > 
> > > Best regards
> > > Uwe
> > > 
> > >  drivers/tty/serial/8250/Kconfig  | 2 +-
> > >  drivers/tty/serial/8250/Makefile | 2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
> > > index 5313aa31930f..10c09b19c871 100644
> > > --- a/drivers/tty/serial/8250/Kconfig
> > > +++ b/drivers/tty/serial/8250/Kconfig
> > > @@ -378,7 +378,7 @@ config SERIAL_8250_BCM2835AUX
> > >  
> > >  config SERIAL_8250_FSL
> > >  	bool "Freescale 16550 UART support" if COMPILE_TEST && !(PPC || ARM || ARM64)
> > > -	depends on SERIAL_8250_CONSOLE
> > > +	depends on SERIAL_8250
> > 
> > Why this cannot simply be:
> > 	depends on SERIAL_8250=y
> 
> This doesn't work, because then the FSL-workarounds are missing if the
> 8250 driver is compiled as a module.

How can 8250 driver be a module and fsl still get enabled?

What I think (not a Kconfig expert for sure) would happen is that 8250_fsl 
won't be enabled at all if CONFIG_SERIAL_8250=m because it depends on 
SERIAL_8250=y.

-- 
 i.

  reply	other threads:[~2023-05-31 10:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31  8:32 [PATCH v2] serial: 8250: Apply FSL workarounds also without SERIAL_8250_CONSOLE Uwe Kleine-König
2023-05-31  9:47 ` Ilpo Järvinen
2023-05-31 10:04   ` Uwe Kleine-König
2023-05-31 10:09     ` Ilpo Järvinen [this message]
2023-05-31 10:40       ` Uwe Kleine-König
2023-05-31 17:51         ` Uwe Kleine-König
2023-06-01 10:49           ` Ilpo Järvinen
2023-06-02  9:21             ` Ilpo Järvinen
2023-06-02 10:09               ` 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=9eab900-9387-4db2-3f24-29d4d1dcb411@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-serial@vger.kernel.org \
    --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