linux-kernel-test/drivers/pci
Olof Johansson f797f9cc54 [PATCH] Fix PCI BAR size interpretation on 64-bit arches
On 64-bit machines, PCI_BASE_ADDRESS_MEM_MASK and other mask constants
passed to pci_size() are 64-bit (for example ~0x0fUL).  However, pci_size
does comparisons between the u32 arguments and the mask, which will fail
even though any result from pci_size is still just 32-bit.

Changing the mask argument to u32 seems the obvious thing to do, since all
arithmetic in the function is 32-bit and having a larger mask makes no
sense.

This triggered on a PPC64 system here where an adapter (VGA, as it
happened) had a memory region base of 0xfe000000 and a sz of the same,
matching the if (max == maxbase ...) test at the bottom of pci_size but
failing the mask comparison.  Quite a corner case which I guess explains
why we haven't seen it until now.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-13 20:58:58 -07:00
..
hotplug [PATCH] PCI Hotplug: fix CPCI reference counting bug 2005-06-09 01:37:59 -07:00
pcie [PATCH] PCI Hotplug: get pciehp to work on the downstream port of a switch 2005-05-17 14:31:11 -07:00
access.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bus.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gen-devlist.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hotplug.c [PATCH] PCI: add MODALIAS to hotplug event for pci devices 2005-05-17 14:31:12 -07:00
Kconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
msi.c [PATCH] PCI: Spelling fixes for drivers/pci. 2005-05-03 23:45:16 -07:00
msi.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
names.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-acpi.c [PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings. 2005-05-03 23:45:14 -07:00
pci-driver.c [PATCH] PCI: Spelling fixes for drivers/pci. 2005-05-03 23:45:16 -07:00
pci-sysfs.c [PATCH] PCI: add modalias sysfs file for pci devices 2005-05-17 14:31:12 -07:00
pci.c [PATCH] PCI: drivers/pci/pci.c: remove pci_dac_set_dma_mask 2005-05-03 23:45:17 -07:00
pci.h [PATCH] PCI Hotplug: remove pci_visit_dev 2005-05-17 14:31:11 -07:00
pci.ids [TG3]: Update pci.ids for BCM5752 2005-06-06 15:14:35 -07:00
probe.c [PATCH] Fix PCI BAR size interpretation on 64-bit arches 2005-06-13 20:58:58 -07:00
proc.c [PATCH] PCI: Clean up a lot of sparse "Should it be static?" warnings. 2005-05-03 23:45:14 -07:00
quirks.c [PATCH] PCI: MSI functionality broken on Serverworks GC chipset 2005-06-09 14:52:30 -07:00
remove.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rom.c [PATCH] DocBook: fix some descriptions 2005-05-01 08:59:26 -07:00
search.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup-bus.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup-irq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup-res.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
syscall.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00