Re: [PATCH v7 02/60] sparc/PCI: Use correct bus address to resource offset
From: Khalid Aziz
Date: Fri Oct 09 2015 - 12:21:13 EST
On Thu, 2015-10-08 at 14:38 -0700, Yinghai Lu wrote:
> After we add 64bit mmio parsing, we got some "no compatible bridge window"
> warning on anther new model that support 64bit resource.
>
> It turns out that we can not use mem_space.start as 64bit mem space
> offset, aka mem_space.start != offset.
>
> Use child_phys_addr to calculate exact offset and recorder offset in
> pbm. Still assume all mem have same offset, otherwise panic early.
>
> After patch we get correct offset.
>
> /pci@305: PCI IO [io 0x2007e00000000-0x2007e0fffffff] offset 2007e00000000
> /pci@305: PCI MEM [mem 0x2000000100000-0x200007effffff] offset 2000000000000
> /pci@305: PCI MEM64 [mem 0x2000100000000-0x2000dffffffff] offset 2000000000000
> ...
> pci_sun4v f02ae7f8: PCI host bridge to bus 0000:00
> pci_bus 0000:00: root bus resource [io 0x2007e00000000-0x2007e0fffffff] (bus address [0x0000-0xfffffff])
> pci_bus 0000:00: root bus resource [mem 0x2000000100000-0x200007effffff] (bus address [0x00100000-0x7effffff])
> pci_bus 0000:00: root bus resource [mem 0x2000100000000-0x2000dffffffff] (bus address [0x100000000-0xdffffffff])
>
>
> -v2: to make is simple, do not add mem64_offset, and assume
> mem64_offset == mem_offset, otherwise would make
> pci_mmap_resource() path too complicated.
>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
Tested on sparc platforms
Tested-by: Khalid Aziz <khalid.aziz@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/