linux-stable/include
Yinghai Lu 35a58011be PCI: Add pci_bus_addr_t
commit 3a9ad0b4fd upstream.

David Ahern reported that d63e2e1f3d ("sparc/PCI: Clip bridge windows
to fit in upstream windows") fails to boot on sparc/T5-8:

  pci 0000:06:00.0: reg 0x184: can't handle BAR above 4GB (bus address 0x110204000)

The problem is that sparc64 assumed that dma_addr_t only needed to hold DMA
addresses, i.e., bus addresses returned via the DMA API (dma_map_single(),
etc.), while the PCI core assumed dma_addr_t could hold *any* bus address,
including raw BAR values.  On sparc64, all DMA addresses fit in 32 bits, so
dma_addr_t is a 32-bit type.  However, BAR values can be 64 bits wide, so
they don't fit in a dma_addr_t.  d63e2e1f3d added new checking that
tripped over this mismatch.

Add pci_bus_addr_t, which is wide enough to hold any PCI bus address,
including both raw BAR values and DMA addresses.  This will be 64 bits
on 64-bit platforms and on platforms with a 64-bit dma_addr_t.  Then
dma_addr_t only needs to be wide enough to hold addresses from the DMA API.

[bhelgaas: changelog, bugzilla, Kconfig to ensure pci_bus_addr_t is at
least as wide as dma_addr_t, documentation]
Fixes: d63e2e1f3d ("sparc/PCI: Clip bridge windows to fit in upstream windows")
Fixes: 23b13bc76f ("PCI: Fail safely if we can't handle BARs larger than 4GB")
Link: http://lkml.kernel.org/r/CAE9FiQU1gJY1LYrxs+ma5LCTEEe4xmtjRG0aXJ9K_Tsu+m9Wuw@mail.gmail.com
Link: http://lkml.kernel.org/r/1427857069-6789-1-git-send-email-yinghai@kernel.org
Link: https://bugzilla.kernel.org/show_bug.cgi?id=96231
Reported-by: David Ahern <david.ahern@oracle.com>
Tested-by: David Ahern <david.ahern@oracle.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-21 10:10:14 -07:00
..
acpi ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address. 2015-05-17 09:55:10 -07:00
asm-generic OK, this has the big virtio 1.0 implementation, as specified by OASIS. 2015-02-18 09:24:01 -08:00
clocksource time: move the timecounter/cyclecounter code into its own file. 2014-12-30 18:29:25 -05:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-02-14 09:47:01 -08:00
drm drm/radeon: add new bonaire pci id 2015-06-06 08:21:07 -07:00
dt-bindings clk: tegra: Use the proper parent for plld_dsi 2015-05-06 22:03:58 +02:00
keys
kvm arm/arm64: KVM: Keep elrsr/aisr in sync with software model 2015-03-14 13:42:07 +01:00
linux PCI: Add pci_bus_addr_t 2015-07-21 10:10:14 -07:00
math-emu
media [media] media: atmel-isi: increase the burst length to improve the performance 2015-03-02 13:27:11 -03:00
memory
misc
net sctp: fix ASCONF list handling 2015-07-10 09:45:33 -07:00
pcmcia
ras
rdma Revert "IB/core: Add support for extended query device caps" 2015-02-06 00:54:33 -08:00
rxrpc
scsi SCSI: add 1024 max sectors black list flag 2015-05-13 05:14:29 -07:00
soc pm: at91: Workaround DDRSDRC self-refresh bug with LPDDR1 memories. 2015-03-03 19:43:59 +01:00
sound ASoC: dapm: Enable autodisable on SOC_DAPM_SINGLE_TLV_AUTODISABLE 2015-05-13 05:14:27 -07:00
target target: Fix COMPARE_AND_WRITE with SG_TO_MEM_NOALLOC handling 2015-05-06 22:03:53 +02:00
trace block: discard bdi_unregister() in favour of bdi_destroy() 2015-06-22 17:03:29 -07:00
uapi drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query 2015-06-29 12:29:08 -07:00
video drm/exynos: Enable DP clock to fix display on Exynos5250 and other 2015-05-06 22:04:03 +02:00
xen xen/events: don't bind non-percpu VIRQs with percpu chip 2015-06-06 08:20:52 -07:00
Kbuild