public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Bjorn Helgaas" <bhelgaas@google.com>
Subject: Re: [PATCH 2/2] PCI: Drop controller CONFIG_OF dependencies
Date: Tue, 15 Nov 2022 22:04:09 +0100	[thread overview]
Message-ID: <20221115210409.4xe7awv4ybjks2e3@pali> (raw)
In-Reply-To: <20221115205343.GA1038784@bhelgaas>

On Tuesday 15 November 2022 14:53:43 Bjorn Helgaas wrote:
> On Tue, Nov 15, 2022 at 08:31:55PM +0100, Pali Rohár wrote:
> > On Tuesday 15 November 2022 12:07:34 Bjorn Helgaas wrote:
> > > On Tue, Nov 15, 2022 at 04:56:10PM +0100, Geert Uytterhoeven wrote:
> > > > On Tue, Oct 25, 2022 at 9:16 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > > > > From: Bjorn Helgaas <bhelgaas@google.com>
> > > > >
> > > > > Many drivers depend on OF interfaces, so they won't be functional if
> > > > > CONFIG_OF is not set.  But OF provides stub functions in that case, so drop
> > > > > the OF dependencies so we can at least compile-test the drivers.
> > > 
> > > > > --- a/drivers/pci/controller/Kconfig
> > > > > +++ b/drivers/pci/controller/Kconfig
> > > > > @@ -8,7 +8,6 @@ config PCI_MVEBU
> > > > >         depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST
> > > > >         depends on MVEBU_MBUS
> > > > >         depends on ARM
> > > > > -       depends on OF
> > > > 
> > > > This is exactly why we have the COMPILE_TEST symbol.
> > > > There is no point in bothering all users who configure kernels with
> > > > questions about drivers that won't function anyway due to missing
> > > > dependencies, unless the user explicitly wants to do compile-testing.
> > > > 
> > > > So all of these should become:
> > > > 
> > > >     depends on OF || COMPILE_TEST
> > > 
> > > Oh, yes, thanks for pointing this out, I totally blew it here.  I
> > > dropped this while we figure it out.
> > 
> > I agree too, it really makes sense to not provide pci-mvebu driver to
> > end users without OF - it would not work.
> > 
> > Anyway, it is needed to declare "depends on ARM" for pci-mvebu?
> > Both supported architectures (mvebu and dove) are ARM.
> 
> If you're asking whether "depends on ARM" can be removed for
> PCI_MVEBU, I don't know the answer.  I do see that CONFIG_ARCH_MVEBU
> is mentioned in arch/arm64, which doesn't seem to set CONFIG_ARM.

Ou, you are right. Correct interpretation is "depends on 32-bit mvebu".
And because ARCH_MVEBU means "32-bit mvebu OR 64-bit mvebu" there is
additional "depends on ARM" to filter-out 64-bit mvebu.

So _architecture_ dependency based on intention should be:

(ARCH_MVEBU && ARM) || ARCH_DOVE || COMPILE_TEST

But because there is no 64-bit Dove, it has same meaning as moving ARM
from inner conjunction to outer.

I do not know which syntax is better. So choose what you prefer (current
version or some modification).

> In any event, I would consider a change like that to be a separate
> patch.  Here I just want to focus on CONFIG_OF.
> 
> Bjorn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-15 21:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 19:13 [PATCH 0/2] PCI: Drop controller CONFIG_OF dependencies Bjorn Helgaas
2022-10-25 19:13 ` [PATCH 1/2] PCI: Drop of_match_ptr() to avoid unused variables Bjorn Helgaas
2022-10-25 19:13 ` [PATCH 2/2] PCI: Drop controller CONFIG_OF dependencies Bjorn Helgaas
2022-11-15 15:56   ` Geert Uytterhoeven
2022-11-15 18:07     ` Bjorn Helgaas
2022-11-15 19:27       ` Geert Uytterhoeven
2022-11-15 19:31       ` Pali Rohár
2022-11-15 20:53         ` Bjorn Helgaas
2022-11-15 21:04           ` Pali Rohár [this message]
2022-11-10 21:03 ` [PATCH 0/2] " Bjorn Helgaas

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=20221115210409.4xe7awv4ybjks2e3@pali \
    --to=pali@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=geert@linux-m68k.org \
    --cc=helgaas@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=robh@kernel.org \
    /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