diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-19 07:45:44 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-20 17:28:53 -0600 |
commit | 8f38eaca55d0fab7499b33adb1dec33e16de5abb (patch) | |
tree | d5f7a0b123d073b8fb75ca46e82e1862f88a9e13 /drivers/pci/hotplug | |
parent | 8291550f8479fde2cee571d1b367e6918819f189 (diff) | |
download | blackbird-op-linux-8f38eaca55d0fab7499b33adb1dec33e16de5abb.tar.gz blackbird-op-linux-8f38eaca55d0fab7499b33adb1dec33e16de5abb.zip |
PCI: fix P2P bridge I/O port window sign extension
On P2P bridges with 32-bit I/O decoding, we incorrectly sign-extended
windows starting at 0x80000000 or above. In "base |= (io_base_hi << 16)",
"io_base_hi" is promoted to a signed int before being extended to an
unsigned long.
This would cause a window starting at I/O address 0x80000000 to be
treated as though it started at 0xffffffff80008000 instead, which
should cause "no compatible bridge window" errors when we enumerate
devices using that I/O space.
The mmio and mmio_pref casts are not strictly necessary, but without
them, correctness depends on the types of the PCI_MEMORY_RANGE_MASK and
PCI_PREF_RANGE_MASK constants, which are not obvious from reading the
local code.
Found by Coverity (CID 138747 and CID 138748).
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug')
0 files changed, 0 insertions, 0 deletions