Lines Matching full:cfg
21 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in pci_dev_base() local
23 if (cfg && cfg->virt) in pci_dev_base()
24 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base()
99 static void __iomem *mcfg_ioremap(struct pci_mmcfg_region *cfg) in mcfg_ioremap() argument
105 start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus); in mcfg_ioremap()
106 num_buses = cfg->end_bus - cfg->start_bus + 1; in mcfg_ioremap()
110 addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus); in mcfg_ioremap()
116 struct pci_mmcfg_region *cfg; in pci_mmcfg_arch_init() local
118 list_for_each_entry(cfg, &pci_mmcfg_list, list) in pci_mmcfg_arch_init()
119 if (pci_mmcfg_arch_map(cfg)) { in pci_mmcfg_arch_init()
131 struct pci_mmcfg_region *cfg; in pci_mmcfg_arch_free() local
133 list_for_each_entry(cfg, &pci_mmcfg_list, list) in pci_mmcfg_arch_free()
134 pci_mmcfg_arch_unmap(cfg); in pci_mmcfg_arch_free()
137 int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) in pci_mmcfg_arch_map() argument
139 cfg->virt = mcfg_ioremap(cfg); in pci_mmcfg_arch_map()
140 if (!cfg->virt) { in pci_mmcfg_arch_map()
141 pr_err(PREFIX "can't map MMCONFIG at %pR\n", &cfg->res); in pci_mmcfg_arch_map()
148 void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg) in pci_mmcfg_arch_unmap() argument
150 if (cfg && cfg->virt) { in pci_mmcfg_arch_unmap()
151 iounmap(cfg->virt + PCI_MMCFG_BUS_OFFSET(cfg->start_bus)); in pci_mmcfg_arch_unmap()
152 cfg->virt = NULL; in pci_mmcfg_arch_unmap()