summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/pci_x86.h6
-rw-r--r--arch/x86/pci/mmconfig-shared.c50
-rw-r--r--arch/x86/pci/mmconfig_32.c6
-rw-r--r--arch/x86/pci/mmconfig_64.c16
4 files changed, 39 insertions, 39 deletions
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index 3a2ca5f69521..a752d618f196 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -120,9 +120,9 @@ extern int __init pcibios_init(void);
struct pci_mmcfg_region {
u64 address;
- u16 pci_segment;
- u8 start_bus_number;
- u8 end_bus_number;
+ u16 segment;
+ u8 start_bus;
+ u8 end_bus;
};
extern int __init pci_mmcfg_arch_init(void);
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 5f7afdd1e2d6..5479fbb2d6ab 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -57,9 +57,9 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
pci_mmcfg_config_num++;
pci_mmcfg_config[i].address = addr;
- pci_mmcfg_config[i].pci_segment = segment;
- pci_mmcfg_config[i].start_bus_number = start;
- pci_mmcfg_config[i].end_bus_number = end;
+ pci_mmcfg_config[i].segment = segment;
+ pci_mmcfg_config[i].start_bus = start;
+ pci_mmcfg_config[i].end_bus = end;
return &pci_mmcfg_config[i];
}
@@ -260,8 +260,8 @@ static int __init cmp_mmcfg(const void *x1, const void *x2)
const typeof(pci_mmcfg_config[0]) *m2 = x2;
int start1, start2;
- start1 = m1->start_bus_number;
- start2 = m2->start_bus_number;
+ start1 = m1->start_bus;
+ start2 = m2->start_bus;
return start1 - start2;
}
@@ -279,8 +279,8 @@ static void __init pci_mmcfg_check_end_bus_number(void)
if (pci_mmcfg_config_num > 0) {
i = pci_mmcfg_config_num - 1;
cfg = &pci_mmcfg_config[i];
- if (cfg->end_bus_number < cfg->start_bus_number)
- cfg->end_bus_number = 255;
+ if (cfg->end_bus < cfg->start_bus)
+ cfg->end_bus = 255;
}
/* don't overlap please */
@@ -288,11 +288,11 @@ static void __init pci_mmcfg_check_end_bus_number(void)
cfg = &pci_mmcfg_config[i];
cfgx = &pci_mmcfg_config[i+1];
- if (cfg->end_bus_number < cfg->start_bus_number)
- cfg->end_bus_number = 255;
+ if (cfg->end_bus < cfg->start_bus)
+ cfg->end_bus = 255;
- if (cfg->end_bus_number >= cfgx->start_bus_number)
- cfg->end_bus_number = cfgx->start_bus_number - 1;
+ if (cfg->end_bus >= cfgx->start_bus)
+ cfg->end_bus = cfgx->start_bus - 1;
}
}
@@ -350,13 +350,13 @@ static void __init pci_mmcfg_insert_resources(void)
names = (void *)&res[pci_mmcfg_config_num];
for (i = 0; i < pci_mmcfg_config_num; i++, res++) {
struct pci_mmcfg_region *cfg = &pci_mmcfg_config[i];
- num_buses = cfg->end_bus_number - cfg->start_bus_number + 1;
+ num_buses = cfg->end_bus - cfg->start_bus + 1;
res->name = names;
snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN,
- "PCI MMCONFIG %u [%02x-%02x]", cfg->pci_segment,
- cfg->start_bus_number, cfg->end_bus_number);
+ "PCI MMCONFIG %u [%02x-%02x]", cfg->segment,
+ cfg->start_bus, cfg->end_bus);
res->start = cfg->address +
- PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number);
+ PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
res->end = res->start + PCI_MMCFG_BUS_OFFSET(num_buses) - 1;
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
insert_resource(&iomem_resource, res);
@@ -457,13 +457,13 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved,
valid = 1;
if (old_size != size) {
- /* update end_bus_number */
- cfg->end_bus_number = cfg->start_bus_number + ((size>>20) - 1);
+ /* update end_bus */
+ cfg->end_bus = cfg->start_bus + ((size>>20) - 1);
printk(KERN_NOTICE "PCI: updated MCFG configuration %d: base %lx "
"segment %hu buses %u - %u\n",
- i, (unsigned long)cfg->address, cfg->pci_segment,
- (unsigned int)cfg->start_bus_number,
- (unsigned int)cfg->end_bus_number);
+ i, (unsigned long)cfg->address, cfg->segment,
+ (unsigned int)cfg->start_bus,
+ (unsigned int)cfg->end_bus);
}
}
@@ -484,14 +484,14 @@ static void __init pci_mmcfg_reject_broken(int early)
cfg = &pci_mmcfg_config[i];
addr = cfg->address +
- PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number);
- num_buses = cfg->end_bus_number - cfg->start_bus_number + 1;
+ PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
+ num_buses = cfg->end_bus - cfg->start_bus + 1;
size = PCI_MMCFG_BUS_OFFSET(num_buses);
printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx "
"segment %hu buses %u - %u\n",
- i, (unsigned long)cfg->address, cfg->pci_segment,
- (unsigned int)cfg->start_bus_number,
- (unsigned int)cfg->end_bus_number);
+ i, (unsigned long)cfg->address, cfg->segment,
+ (unsigned int)cfg->start_bus,
+ (unsigned int)cfg->end_bus);
if (!early && !acpi_disabled)
valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0);
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index 3936eced993c..a3cee532c935 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -32,9 +32,9 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) {
cfg = &pci_mmcfg_config[cfg_num];
- if (cfg->pci_segment == seg &&
- (cfg->start_bus_number <= bus) &&
- (cfg->end_bus_number >= bus))
+ if (cfg->segment == seg &&
+ (cfg->start_bus <= bus) &&
+ (cfg->end_bus >= bus))
return cfg->address;
}
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
index 7a6231c3335e..fdf08f97131b 100644
--- a/arch/x86/pci/mmconfig_64.c
+++ b/arch/x86/pci/mmconfig_64.c
@@ -26,9 +26,9 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus)
for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) {
cfg = pci_mmcfg_virt[cfg_num].cfg;
- if (cfg->pci_segment == seg &&
- (cfg->start_bus_number <= bus) &&
- (cfg->end_bus_number >= bus))
+ if (cfg->segment == seg &&
+ (cfg->start_bus <= bus) &&
+ (cfg->end_bus >= bus))
return pci_mmcfg_virt[cfg_num].virt;
}
@@ -115,14 +115,14 @@ static void __iomem * __init mcfg_ioremap(struct pci_mmcfg_region *cfg)
u64 start, size;
int num_buses;
- start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number);
- num_buses = cfg->end_bus_number - cfg->start_bus_number + 1;
+ start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
+ num_buses = cfg->end_bus - cfg->start_bus + 1;
size = PCI_MMCFG_BUS_OFFSET(num_buses);
addr = ioremap_nocache(start, size);
if (addr) {
printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n",
start, start + size - 1);
- addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number);
+ addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
}
return addr;
}
@@ -143,7 +143,7 @@ int __init pci_mmcfg_arch_init(void)
if (!pci_mmcfg_virt[i].virt) {
printk(KERN_ERR "PCI: Cannot map mmconfig aperture for "
"segment %d\n",
- pci_mmcfg_config[i].pci_segment);
+ pci_mmcfg_config[i].segment);
pci_mmcfg_arch_free();
return 0;
}
@@ -161,7 +161,7 @@ void __init pci_mmcfg_arch_free(void)
for (i = 0; i < pci_mmcfg_config_num; ++i) {
if (pci_mmcfg_virt[i].virt) {
- iounmap(pci_mmcfg_virt[i].virt + PCI_MMCFG_BUS_OFFSET(pci_mmcfg_virt[i].cfg->start_bus_number));
+ iounmap(pci_mmcfg_virt[i].virt + PCI_MMCFG_BUS_OFFSET(pci_mmcfg_virt[i].cfg->start_bus));
pci_mmcfg_virt[i].virt = NULL;
pci_mmcfg_virt[i].cfg = NULL;
}