lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240716052155.GE3446@thinkpad>
Date: Tue, 16 Jul 2024 10:51:55 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>, Arnd Bergmann <arnd@...db.de>,
	Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
	Luiz Augusto von Dentz <luiz.dentz@...il.com>,
	Srini Kandagatla <srinivas.kandagatla@...aro.org>,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [GIT PULL] power sequencing updates for v6.11-rc1

On Mon, Jul 15, 2024 at 09:29:34PM -0700, Linus Torvalds wrote:
> On Mon, 15 Jul 2024 at 19:17, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> > Hmm. Let's see how this all works out, but I already found an annoyance.
> 
> .. and another one.
> 
> On my Altra box, commit 8fb18619d910 ("PCI/pwrctl: Create platform
> devices for child OF nodes of the port node") causes annoying messages
> at bootup:
> 
>   pci 000c:00:01.0: failed to populate child OF nodes (-22)
>   pci 000c:00:02.0: failed to populate child OF nodes (-22)
>   .. repeat for every PCI bridge ..
> 
> for no obvious reason.
> 
> FWIW, -22 is -EINVAL.
> 

So we did see these error messages on non-CONFIG_OF platforms, and a fix was
merged as well with commit, 50b040ef3732 ("PCI/pwrctl: only call
of_platform_populate() if CONFIG_OF is enabled")

But apparently, the fix assumed that all CONFIG_OF platforms (selected in
defconfig) have 'dev.of_node' populated. And your platforms being an ARM64 one,
has CONFIG_OF selected ARM64 defconfig, but uses ACPI instead of devicetree. So
you don't have 'dev.of_node', which is a valid configuration btw (we failed to
spot it). And in other places of these of_ APIs, we do have checks for
'dev.of_node'. So for this issue, below diff should be sufficient:

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 3bab78cc68f7..abe826bb5840 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -350,7 +350,7 @@ void pci_bus_add_device(struct pci_dev *dev)
 
        pci_dev_assign_added(dev, true);
 
-       if (IS_ENABLED(CONFIG_OF) && pci_is_bridge(dev)) {
+       if (IS_ENABLED(CONFIG_OF) && dev->dev.of_node && pci_is_bridge(dev)) {
                retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
                                              &dev->dev);
                if (retval)

Let me know if it works, I can spin a patch.

- Mani

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ