Files
OrangePi_CM5/include/linux
Yinghai Lu 3a9ad0b4fd PCI: Add pci_bus_addr_t
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>
CC: stable@vger.kernel.org	# v3.19+
2015-05-29 17:21:45 -05:00
..
2014-09-22 16:48:47 +09:00
2015-03-29 16:17:10 +01:00
…
2014-11-24 17:24:08 -05:00
2015-01-29 10:49:28 +02:00
2015-04-07 11:17:34 +02:00
…
…
…
…
2015-03-25 20:28:11 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-17 09:03:53 -04:00
2015-04-17 08:31:12 -06:00
…
…
…
…
…
…
…
…
…
…
…
2015-03-11 15:56:59 -07:00
…
…
…
…
…
…
…
2015-04-16 12:33:51 +09:30
…
…
…
…
…
…
2015-02-12 18:54:15 -08:00
…
…
…
…
…
2014-12-19 22:55:06 +01:00
…
…
…
…
…
…
…
…
2015-01-21 19:21:30 +01:00
2014-11-10 09:27:30 -07:00
…
…
…
…
…
…
…
…
…
…
2015-03-02 16:43:41 -05:00
…
…
…
…
…
…
…
…
…
2014-12-31 13:06:50 -05:00
…
…
…
…
2014-10-09 11:35:48 +03:00
2014-10-08 16:01:41 -04:00
…
…
…
…
…
…
…
2015-02-18 15:08:33 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
2015-03-16 21:45:54 +11:00
…
2015-04-03 16:18:02 +02:00
…
…
…
…
…
…
…
…
…
…
2015-01-27 11:09:13 +01:00
…
…
…
…
2014-09-29 15:37:01 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-01-15 10:34:54 +01:00
2015-01-15 10:34:54 +01:00
…
…
…
…
…
2015-02-13 21:21:36 -08:00
…
…
…
…
…
…
…
…
2014-12-18 09:39:51 +01:00
…
…
…
…
…
…
…
…
…
2015-01-04 23:11:43 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-14 16:49:05 -07:00
…
2015-03-25 11:44:52 +01:00
…
…
2015-04-17 09:04:07 -04:00
…
2014-10-09 22:25:58 -04:00
2015-03-31 12:04:12 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
2015-04-23 14:36:28 -04:00
…
…
…
…
…
…
…
…
…
…
…
2015-03-11 17:56:28 -04:00
…
2014-11-04 13:29:38 +00:00
…
…
…
…
…
…
…
…
…
…
2015-05-29 17:21:45 -05:00
…
2015-04-12 21:03:31 +02:00
…
…
2015-01-25 23:17:28 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-02-17 14:34:52 -08:00
2015-01-06 11:01:13 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-02-24 08:44:16 +01:00
2015-03-26 18:18:20 +01:00
…
…
…
…
…
…
…
…
…
2015-04-25 15:49:49 -04:00
2015-02-13 21:21:41 -08:00
…
…
…
…
2015-03-11 21:55:28 -04:00
2015-04-11 15:53:35 -04:00
…
…
…
…
2015-01-03 14:32:57 -05:00
…
…
…
…
2015-02-13 21:21:35 -08:00
…
…
…
…
…
…
2015-03-25 13:28:58 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-05-29 17:21:45 -05:00
…
…
…
2015-04-11 22:29:44 -04:00
…
…
…
…
2014-11-28 16:08:16 +01:00
…
…
…
2014-12-09 12:05:24 +02:00
…
…
2014-12-15 23:49:28 +02:00
…
…
…
…
2015-03-24 09:48:14 -07:00
…
…
…
…
…
…
…
…
2015-04-15 16:35:20 -07:00
…