summaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/mmconfig_32.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-11-13 17:34:49 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-24 15:30:14 -0800
commitff097ddd4aeac790fd51d013c79c2f18ec9a7117 (patch)
tree4a77f081e4ac7e93aa74a102bf372419699468b9 /arch/x86/pci/mmconfig_32.c
parent987c367b4e93be6826394e7c9cc14d28bb5c8810 (diff)
downloadop-kernel-dev-ff097ddd4aeac790fd51d013c79c2f18ec9a7117.zip
op-kernel-dev-ff097ddd4aeac790fd51d013c79c2f18ec9a7117.tar.gz
x86/PCI: MMCONFIG: manage pci_mmcfg_region as a list, not a table
This changes pci_mmcfg_region from a table to a list, to make it easier to add and remove MMCONFIG regions for PCI host bridge hotplug. Reviewed-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/mmconfig_32.c')
-rw-r--r--arch/x86/pci/mmconfig_32.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index a3cee53..c04523e 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -28,15 +28,12 @@ static int mmcfg_last_accessed_cpu;
static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
{
struct pci_mmcfg_region *cfg;
- int cfg_num;
- for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) {
- cfg = &pci_mmcfg_config[cfg_num];
+ list_for_each_entry(cfg, &pci_mmcfg_list, list)
if (cfg->segment == seg &&
(cfg->start_bus <= bus) &&
(cfg->end_bus >= bus))
return cfg->address;
- }
/* Fall back to type 0 */
return 0;
OpenPOWER on IntegriCloud