From: Herton R. Krzesinski herton@redhat.com
Revert "PCI: of: Refactor the check for non-prefetchable 32-bit window"
This reverts commit 7526d4b295786a611864afff7913a79a49a2cb71.
It was dropped from final upsream series merged: https://lore.kernel.org/linux-pci/20210614230457.752811-1-punitagrawal@gmail...
Signed-off-by: Herton R. Krzesinski herton@redhat.com
diff --git a/drivers/pci/of.c b/drivers/pci/of.c index blahblah..blahblah 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -573,6 +573,12 @@ static int pci_parse_request_of_pci_ranges(struct device *dev, break; case IORESOURCE_MEM: res_valid |= !(res->flags & IORESOURCE_PREFETCH); + + if (!(res->flags & IORESOURCE_PREFETCH)) + if (!(res->flags & IORESOURCE_MEM_64) && + upper_32_bits(resource_size(res))) + dev_warn(dev, "Memory resource size exceeds max for 32 bits\n"); + break; } }
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1187