Re: [PATCH 1/2] serial: 8250_lpss: fix Kconfig dependencies

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

 



On Fri, 2016-12-16 at 11:50 +0100, Jean Delvare wrote:
> Hiding tristate options with "if EXPERT" is usually not a good idea.
> You can decide that the driver should be included by default, but you
> don't know if the user wants it built-in or as a module. Hiding the
> option prevents the user from making that decision.

Then please start from 8250_PCI.

> This is even more problematic when said option selects other options.
> You end up with several device drivers forcibly built into the kernel.
> 
> In this specific case, drivers 8250_lpss, dw_dmac_core and
> dw_dmac_pci end up being built-in as soon as SERIAL_8250=y. It is
> very common for distribution kernels to build the subsystem core code
> into the kernel, because almost everybody will need it, but build all
> the drivers as modules. This should be made possible.

...and make new problems occur. We have no driver dependency between
them, so, depending of load ordering the user will or will not have DMA
resource available.

That's why I would like to keep this for EXPERTs.

CONFIG_EXPERT=y
CONFIG_SERIAL_8250_LPSS=m 

will not work?

> 
> So drop the "if EXPERT" and make SERIAL_8250_LPSS visible. The right
> way to avoid annoying people who couldn't care less about this option
> is to make it depend on X86_INTEL_LPSS. There may be no technical
> dependency between these two options, but in practice, either people
> want support for a platform, or they don't.

No. You forget Intel Quark. It has nothing to do with X86_INTEL_LPSS.

> 
> Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
> Fixes: a13e19cf3dc1 ("serial: 8250_lpss: split LPSS driver to separate
> module")
> Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Jiri Slaby <jslaby@xxxxxxxx>
> ---
>  drivers/tty/serial/8250/Kconfig |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> --- linux-4.9.orig/drivers/tty/serial/8250/Kconfig	2016-12-11
> 20:17:54.000000000 +0100
> +++ linux-4.9/drivers/tty/serial/8250/Kconfig	2016-12-16
> 11:10:53.522659445 +0100
> @@ -402,12 +402,12 @@ config SERIAL_8250_INGENIC
>  	  its UARTs, say Y to this option. If unsure, say N.
>  
>  config SERIAL_8250_LPSS
> -	tristate "Support for serial ports on Intel LPSS platforms"
> if EXPERT
> +	tristate "Support for serial ports on Intel LPSS platforms"

>  	default SERIAL_8250
>  	depends on SERIAL_8250 && PCI
> 

> -	depends on X86 || COMPILE_TEST
> +	depends on X86_INTEL_LPSS || COMPILE_TEST

No.

>  	select DW_DMAC_CORE if SERIAL_8250_DMA
> -	select DW_DMAC_PCI if (SERIAL_8250_DMA && X86_INTEL_LPSS)
> +	select DW_DMAC_PCI if SERIAL_8250_DMA

No.

Because of Quark. 

>  	select RATIONAL
>  	help
>  	  Selecting this option will enable handling of the extra
> features
> 
> 

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux