• Y
    PCI: Preserve resource size during alignment reordering · 552bc94e
    Yinghai Lu 提交于
    In d74b9027 ("PCI: Consider additional PF's IOV BAR alignment in sizing
    and assigning"), we store additional alignment in realloc_head and take
    this into consideration for assignment.
    
    In __assign_resources_sorted(), we changed dev_res->res->start, then used
    resource_start() (which depends on res->start), so the recomputed res->end
    was completely bogus.  Even if we'd had the correct size, the end would
    have been off by one.
    
    Preserve the resource size when we adjust its alignment.
    
    [bhelgaas: changelog]
    Fixes: d74b9027 ("PCI: Consider additional PF's IOV BAR alignment in sizing and assigning")
    Signed-off-by: NYinghai Lu <yinghai@kernel.org>
    Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    Acked-by: NWei Yang <weiyang@linux.vnet.ibm.com>
    CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    552bc94e
setup-bus.c 48.6 KB