Re: [PATCH] PCI: rcar: Add missing COMMON_CLK dependency

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

 



On Wed, Sep 29, 2021 at 03:55:09PM +0100, Lorenzo Pieralisi wrote:
> On Wed, Sep 22, 2021 at 01:13:11AM +0200, Marek Vasut wrote:
> > On 9/21/21 6:08 PM, Geert Uytterhoeven wrote:
> > 
> > [...]
> > 
> > > > diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> > > > index 326f7d13024f..ee6f5e525d3a 100644
> > > > --- a/drivers/pci/controller/Kconfig
> > > > +++ b/drivers/pci/controller/Kconfig
> > > > @@ -66,6 +66,7 @@ config PCI_RCAR_GEN2
> > > >   config PCIE_RCAR_HOST
> > > >          bool "Renesas R-Car PCIe host controller"
> > > >          depends on ARCH_RENESAS || COMPILE_TEST
> > > > +       depends on COMMON_CLK
> > > 
> > > This part is OK.
> > 
> > This part is also identical in the patch from Arnd, so you can just pick
> > that one as a fix and be done with it:
> > 
> > [PATCH] PCI: rcar: add COMMON_CLK dependency
> > https://patchwork.kernel.org/project/linux-pci/patch/20210920095730.1216692-1-arnd@xxxxxxxxxx/
> 
> It is not strictly identical (Arnd's patch only touches the COMPILE_TEST
> option).
> 
> Bjorn, shall we pick Arnd's patch up then ? We should be fixing this in
> one of the upcoming -rcs since we introduced it in the last merge
> window.

IIUC, a115b1bd3af0 ("PCI: rcar: Add L1 link state fix into data abort
hook") appeared in v5.15-rc1 and added a use of __clk_is_enabled(),
which is only available when COMMON_CLK=y.

PCIE_RCAR_HOST depends on ARCH_RENESAS || COMPILE_TEST.  ARCH_RENESAS
is an ARM64 platform, so when COMPILE_TEST is not set, I think we get
COMMON_CLK=y via this:

  config ARM64
    select COMMON_CLK

But when ARCH_RENESAS is not set and COMPILE_TEST=y, there's nothing
that enforces the dependency on COMMON_CLK.  Personally I like the
first hunk of Marek's patch at [1] because the dependency on
COMMON_CLK is explicit:

  config PCIE_RCAR_HOST
    depends on ARCH_RENESAS || COMPILE_TEST
    depends on COMMON_CLK

Whereas Arnd's patch [2] implicitly depends on the fact that the platform
selects COMMON_CLK:

  config PCIE_RCAR_HOST
    depends on ARCH_RENESAS || (COMMON_CLK && COMPILE_TEST)

But either is fine and I agree we should fix it soonish.

Bjorn

[1] https://lore.kernel.org/all/20210907144512.5238-1-marek.vasut@xxxxxxxxx/
[2] https://lore.kernel.org/all/20210920095730.1216692-1-arnd@xxxxxxxxxx/



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux