Re: [PATCH] Revert "tty: serial: samsung_tty: build it for any platform"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 06, 2020 at 01:53:01PM +0100, Geert Uytterhoeven wrote:
> Hi Greg,
> 
> On Fri, Mar 6, 2020 at 1:29 PM Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > On Fri, Mar 06, 2020 at 11:23:01AM +0100, Geert Uytterhoeven wrote:
> > > This reverts commit 175b558d0efb8b4f33aa7bd2c1b5389b912d3019.
> > >
> > > When the user configures a kernel without support for Samsung SoCs, it
> > > makes no sense to ask the user about enabling "Samsung SoC serial
> > > support", as Samsung serial ports can only be found on Samsung SoCs.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> > > ---
> > >  drivers/tty/serial/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> > > index 880b962015302dca..932ad51099deae7d 100644
> > > --- a/drivers/tty/serial/Kconfig
> > > +++ b/drivers/tty/serial/Kconfig
> > > @@ -237,6 +237,7 @@ config SERIAL_CLPS711X_CONSOLE
> > >
> > >  config SERIAL_SAMSUNG
> > >       tristate "Samsung SoC serial support"
> > > +     depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
> > >       select SERIAL_CORE
> > >       help
> > >         Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
> >
> > {sigh}
> 
> Exactly my feeling.
> 
> > No, I don't want this.  My "goal" is to be able to get rid of all of the
> > crazy "PLAT_*" symbols as they make it impossible to build a single
> > kernel that supports multiple ARM64 systems.
> 
> This dependency does not make it impossible to build a single
> kernel that supports multiple ARM64 systems.
> 
> Those "PLAT_*" symbols are not crazy.  They are needed to configure a
> kernel for your specific hardware, leaving out support you don't need.
> Not everyone has the hardware resources to run an allyesconfig kernel.
> 
> > As an example of just such a system, see the 5.4 tree here:
> >         https://android.googlesource.com/kernel/common/+/refs/heads/android-5.4
> > it is now building and booting on multiple SoCs.
> 
> arm/multi_v7_defconfig and arm64/defconfig kernels are already booting
> on multiple SoCs in upstream, and have done so for years.
> 
> > But yes, it still does have to enable some PLAT_* config options, but
> > the goal is to not have to do that eventually.
> 
> Whether the dependency is present or not does not change this.
> 
> > There is no reason that we need vendor-specific config options just to
> > lump random drivers into, like serial drivers.  If the hardware is not
> > present, the driver will just not bind to the hardware, and all is fine.
> 
> Not having the dependency means you will ask the user useless questions
> when configuring his kernel.
> My goal is to make kernel configuration easier, not more difficult.
> 
> > Just like x86, we don't have this issue there, and ARM64 should also not
> > have this.
> 
> No, because x86 is considered the golden standard ;-)
> 
> Dropping those dependencies is similar to always having a simple PCI
> core without any host PCI bridges, dropping "depends on PCI" from all
> PCI drivers, and building an all*config kernel for your old i386 that
> predates PCI (you can replace PCI by ACPI to modernize the example).
> 
> What am I missing?!?

"depends on PCI" describes the hardware bus that a driver depends on.

PLAT_FOO is just trying to somehow classify that this type of driver
only shows up on this vendor's devices.  It is not defining the hardware
at all.  We try to always describe functionality of hardware, not try to
declare specific vendor's hardware choices, right?

PLAT_FOO is interesting, but given that a specific driver is really not
tied to that platform logically, only by virtue that no one else might
not happen to have that hardware, it seems odd to have that.

Yes, asking lots of questions is tough, but we passed that problem so
long ago.  Are we now trying to add PLAT_FOO entries to all hardware
drivers in order to make this type of selection easier?  I thought we
were just doing that by providing defconfig files to make the initial
selection saner.

thanks,

greg k-h



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux