mirror of https://github.com/torvalds/linux.git
On r8a7791/koelsch and shmobile_defconfig, PCIe probing fails with:
rcar-pcie fe000000.pcie: Adjusted size 0x0 invalid
rcar-pcie: probe of fe000000.pcie failed with error -22
of_dma_get_range() returns the following map:
cpu_start 0x40000000 dma_start 0x40000000 size 0x080000000 offset 0
cpu_start 0x00000000 dma_start 0x00000000 size 0x100000000 offset 0
If CONFIG_ARM_LPAE=n, dma_addr_t is 32-bit. Hence when assigning
r->dma_start + r->size to dma_end, this value will be truncated to
32-bit, yielding zero when processing the second table entry.
Consequently, both dma_start and dma_end will be zero, leading to a zero
size.
Fix this by changing the dma_start and dma_end variables from dma_addr_t
to u64.
Fixes:
|
||
|---|---|---|
| .. | ||
| unittest-data | ||
| Kconfig | ||
| Makefile | ||
| address.c | ||
| base.c | ||
| device.c | ||
| dynamic.c | ||
| fdt.c | ||
| fdt_address.c | ||
| irq.c | ||
| kobj.c | ||
| of_net.c | ||
| of_numa.c | ||
| of_private.h | ||
| of_reserved_mem.c | ||
| overlay.c | ||
| pdt.c | ||
| platform.c | ||
| property.c | ||
| resolver.c | ||
| unittest.c | ||