diff options
| author | Jess <jess@jessie.cafe> | 2026-01-20 13:44:44 +1300 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-02-06 16:44:00 -0600 |
| commit | 3a11167d918a0b727239cedc7bb83f2329bcc49f (patch) | |
| tree | d887d1b68f3178da9cd8ed3864f5b5d780b42d18 | |
| parent | 8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff) | |
PCI: host-generic: Avoid reporting incorrect 'missing reg property' error
When pci_host_common_ecam_create() calls of_address_to_resource(), it
assumes all errors are due to a missing "reg" property in the device tree
node, when they may be due to a malformed "reg" property.
This can manifest when running the qemu "virt" board with a 32-bit kernel
and `highmem=on` and leads to the very confusing error message:
pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges:
pci-host-generic 4010000000.pcie: IO 0x003eff0000..0x003effffff -> 0x0000000000
pci-host-generic 4010000000.pcie: MEM 0x0010000000..0x003efeffff -> 0x0010000000
pci-host-generic 4010000000.pcie: MEM 0x8000000000..0xffffffffff -> 0x8000000000
pci-host-generic 4010000000.pcie: missing "reg" property
pci-host-generic 4010000000.pcie: probe with driver pci-host-generic failed with error -75
Make the error message more generic.
Link: https://www.qemu.org/docs/master/system/arm/virt.html
Signed-off-by: Jess <jess@jessie.cafe>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260120004444.191093-1-jess@jessie.cafe
| -rw-r--r-- | drivers/pci/controller/pci-host-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c index c473e7c03bac..d6258c1cffe5 100644 --- a/drivers/pci/controller/pci-host-common.c +++ b/drivers/pci/controller/pci-host-common.c @@ -32,7 +32,7 @@ struct pci_config_window *pci_host_common_ecam_create(struct device *dev, err = of_address_to_resource(dev->of_node, 0, &cfgres); if (err) { - dev_err(dev, "missing \"reg\" property\n"); + dev_err(dev, "missing or malformed \"reg\" property\n"); return ERR_PTR(err); } |
