Skip to content
Commit d878c9a9 authored by Stephen Warren's avatar Stephen Warren Committed by Anatolij Gustschin
Browse files

pci: fix overflow in __pci_hose_bus_to_phys w/ large RAM



If a 32-bit system has 2GB of RAM, and the base address of that RAM is
2GB, then start+size will overflow a 32-bit value (to a value of 0).

To avoid such an overflow, convert __pci_hose_bus_to_phys() to calculate
the offset of a bus address into a PCI region, rather than comparing a
bus address against the end of a PCI region.

Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 686dca0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment