Re: [PATCH v2] pci: bus: only call of_platform_populate() if CONFIG_OF is enabled
From: Bartosz Golaszewski
Date: Mon Jul 08 2024 - 11:50:26 EST
On Mon, Jul 8, 2024 at 5:46 PM Mario Limonciello <superm1@xxxxxxxxxx> wrote:
>
> On 7/8/2024 10:44, Manivannan Sadhasivam wrote:
> > On Mon, Jul 08, 2024 at 05:34:29PM +0200, Bartosz Golaszewski wrote:
> >> On Mon, 8 Jul 2024 at 17:29, Mario Limonciello <superm1@xxxxxxxxxx> wrote:
> >>>
> >>> On 7/8/2024 3:33, Krzysztof Wilczyński wrote:
> >>>> [...]
> >>>>>> If there aren't any objections, I will take this via the PCI tree, and add
> >>>>>> the missing tags. So, no need to send a new version of this patch.
> >>>>>>
> >>>>>> Thank you for the work here! Appreciated.
> >>>>>>
> >>>>>> Krzysztof
> >>>>>
> >>>>> I don't think you can take it via the PCI tree as it depends on the
> >>>>> changes that went via the new pwrseq tree (with Bjorn's blessing).
> >>>>
> >>>> Aye.
> >>>>
> >>>>> Please leave your Ack here and I will take it with the other PCI
> >>>>> pwrctl changes.
> >>>>
> >>>> Sounds good! With that...
> >>>>
> >>>> Acked-by: Krzysztof Wilczyński <kw@xxxxxxxxx>
> >>>>
> >>>>> After the upcoming merge window we should go back to normal.
> >>>>
> >>>> Thank you!
> >>>>
> >>>> Krzysztof
> >>>
> >>> FWIW this other patch makes it quieter too.
> >>>
> >>> https://lore.kernel.org/linux-pci/20240702180839.71491-1-superm1@xxxxxxxxxx/
> >>
> >> I had applied it previously but backed it out in favor of the new one.
> >>
> >
> > That sounds sensible. The patch referenced above still causes
> > of_platform_populate() to be called on non-OF platforms, which is not optimal.
>
> But couldn't I just as well have CONFIG_OF enabled in my kconfig and get
> the same new noise?
>
If you have CONFIG_OF enabled then of_platform_populate() will go the
normal path and actually try to populate sub-nodes of the host bridge
node. If there are no OF nodes (not a device-tree system) then it will
fail.
Bart