On 10/26/20, 2:16 PM, Rob Herring wrote: > > The current ATU setup only supports a single memory resource which > isn't sufficient if there are also prefetchable memory regions. In order > to support multiple memory regions, we need to move away from fixed ATU > slots and rework the assignment. As there's always an ATU entry for > config space, let's assign index 0 to config space. Then we assign > memory resources to index 1 and up. Finally, if we have an I/O region > and slots remaining, we assign the I/O region last. If there aren't > remaining slots, we keep the same config and I/O space sharing. > > Cc: Vidya Sagar <vidyas@xxxxxxxxxx> > Cc: Jingoo Han <jingoohan1@xxxxxxxxx> Acked-by: Jingoo Han <jingoohan1@xxxxxxxxx> Best regards, Jingoo Han > Cc: Gustavo Pimentel <gustavo.pimentel@xxxxxxxxxxxx> > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx> > Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > Signed-off-by: Rob Herring <robh@xxxxxxxxxx> > --- > For 5.11. This is based on the regression fix for 5.10 I sent[1]. > > Rob > > [1] https://lore.kernel.org/linux-pci/20201026154852.221483-1-robh@xxxxxxxxxx/ > > .../pci/controller/dwc/pcie-designware-host.c | 54 +++++++++++-------- > drivers/pci/controller/dwc/pcie-designware.h | 6 +-- > 2 files changed, 34 insertions(+), 26 deletions(-) > [...]