• Bjorn Helgaas's avatar
    x86/PCI: MMCONFIG: fix region end calculation · 1ca98fa6
    Bjorn Helgaas authored
    The end of an MMCONFIG region depends on the ending bus number, not on the
    number of buses the region covers.  We previously computed the wrong ending
    address whenever the starting bus number was non-zero, e.g.,:
    
      MMCONFIG for [bus 00-1f] at [mem 0xe0000000-0xe1ffffff] (base 0xe0000000)
      MMCONFIG for [bus 20-3f] at [mem 0xe2000000-0xe1ffffff] (base 0xe0000000)
    
    The correct regions are:
    
      MMCONFIG for [bus 00-1f] at [mem 0xe0000000-0xe1ffffff] (base 0xe0000000)
      MMCONFIG for [bus 20-3f] at [mem 0xe2000000-0xe3ffffff] (base 0xe0000000)
    Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    1ca98fa6
mmconfig-shared.c 15.3 KB