aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/mmconfig-shared.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-11-13 19:34:18 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-24 18:29:24 -0500
commitd7e6b66fe87c9f42480d73fc314aecaeae84ca6b (patch)
tree0d8f33a6df0c684f6b7da1e7cbfaf7771cde5bee /arch/x86/pci/mmconfig-shared.c
parentd215a9c8b46e55a1d3bc1cd907c943ef95938a0e (diff)
x86/PCI: MMCONFIG: rename pci_mmcfg_region structure members
This only renames the struct pci_mmcfg_region members; no functional change. 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-shared.c')
-rw-r--r--arch/x86/pci/mmconfig-shared.c50
1 files changed, 25 insertions, 25 deletions
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,
57 57
58 pci_mmcfg_config_num++; 58 pci_mmcfg_config_num++;
59 pci_mmcfg_config[i].address = addr; 59 pci_mmcfg_config[i].address = addr;
60 pci_mmcfg_config[i].pci_segment = segment; 60 pci_mmcfg_config[i].segment = segment;
61 pci_mmcfg_config[i].start_bus_number = start; 61 pci_mmcfg_config[i].start_bus = start;
62 pci_mmcfg_config[i].end_bus_number = end; 62 pci_mmcfg_config[i].end_bus = end;
63 63
64 return &pci_mmcfg_config[i]; 64 return &pci_mmcfg_config[i];
65} 65}
@@ -260,8 +260,8 @@ static int __init cmp_mmcfg(const void *x1, const void *x2)
260 const typeof(pci_mmcfg_config[0]) *m2 = x2; 260 const typeof(pci_mmcfg_config[0]) *m2 = x2;
261 int start1, start2; 261 int start1, start2;
262 262
263 start1 = m1->start_bus_number; 263 start1 = m1->start_bus;
264 start2 = m2->start_bus_number; 264 start2 = m2->start_bus;
265 265
266 return start1 - start2; 266 return start1 - start2;
267} 267}
@@ -279,8 +279,8 @@ static void __init pci_mmcfg_check_end_bus_number(void)
279 if (pci_mmcfg_config_num > 0) { 279 if (pci_mmcfg_config_num > 0) {
280 i = pci_mmcfg_config_num - 1; 280 i = pci_mmcfg_config_num - 1;
281 cfg = &pci_mmcfg_config[i]; 281 cfg = &pci_mmcfg_config[i];
282 if (cfg->end_bus_number < cfg->start_bus_number) 282 if (cfg->end_bus < cfg->start_bus)
283 cfg->end_bus_number = 255; 283 cfg->end_bus = 255;
284 } 284 }
285 285
286 /* don't overlap please */ 286 /* don't overlap please */
@@ -288,11 +288,11 @@ static void __init pci_mmcfg_check_end_bus_number(void)
288 cfg = &pci_mmcfg_config[i]; 288 cfg = &pci_mmcfg_config[i];
289 cfgx = &pci_mmcfg_config[i+1]; 289 cfgx = &pci_mmcfg_config[i+1];
290 290
291 if (cfg->end_bus_number < cfg->start_bus_number) 291 if (cfg->end_bus < cfg->start_bus)
292 cfg->end_bus_number = 255; 292 cfg->end_bus = 255;
293 293
294 if (cfg->end_bus_number >= cfgx->start_bus_number) 294 if (cfg->end_bus >= cfgx->start_bus)
295 cfg->end_bus_number = cfgx->start_bus_number - 1; 295 cfg->end_bus = cfgx->start_bus - 1;
296 } 296 }
297} 297}
298 298
@@ -350,13 +350,13 @@ static void __init pci_mmcfg_insert_resources(void)
350 names = (void *)&res[pci_mmcfg_config_num]; 350 names = (void *)&res[pci_mmcfg_config_num];
351 for (i = 0; i < pci_mmcfg_config_num; i++, res++) { 351 for (i = 0; i < pci_mmcfg_config_num; i++, res++) {
352 struct pci_mmcfg_region *cfg = &pci_mmcfg_config[i]; 352 struct pci_mmcfg_region *cfg = &pci_mmcfg_config[i];
353 num_buses = cfg->end_bus_number - cfg->start_bus_number + 1; 353 num_buses = cfg->end_bus - cfg->start_bus + 1;
354 res->name = names; 354 res->name = names;
355 snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, 355 snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN,
356 "PCI MMCONFIG %u [%02x-%02x]", cfg->pci_segment, 356 "PCI MMCONFIG %u [%02x-%02x]", cfg->segment,
357 cfg->start_bus_number, cfg->end_bus_number); 357 cfg->start_bus, cfg->end_bus);
358 res->start = cfg->address + 358 res->start = cfg->address +
359 PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number); 359 PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
360 res->end = res->start + PCI_MMCFG_BUS_OFFSET(num_buses) - 1; 360 res->end = res->start + PCI_MMCFG_BUS_OFFSET(num_buses) - 1;
361 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 361 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
362 insert_resource(&iomem_resource, res); 362 insert_resource(&iomem_resource, res);
@@ -457,13 +457,13 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved,
457 valid = 1; 457 valid = 1;
458 458
459 if (old_size != size) { 459 if (old_size != size) {
460 /* update end_bus_number */ 460 /* update end_bus */
461 cfg->end_bus_number = cfg->start_bus_number + ((size>>20) - 1); 461 cfg->end_bus = cfg->start_bus + ((size>>20) - 1);
462 printk(KERN_NOTICE "PCI: updated MCFG configuration %d: base %lx " 462 printk(KERN_NOTICE "PCI: updated MCFG configuration %d: base %lx "
463 "segment %hu buses %u - %u\n", 463 "segment %hu buses %u - %u\n",
464 i, (unsigned long)cfg->address, cfg->pci_segment, 464 i, (unsigned long)cfg->address, cfg->segment,
465 (unsigned int)cfg->start_bus_number, 465 (unsigned int)cfg->start_bus,
466 (unsigned int)cfg->end_bus_number); 466 (unsigned int)cfg->end_bus);
467 } 467 }
468 } 468 }
469 469
@@ -484,14 +484,14 @@ static void __init pci_mmcfg_reject_broken(int early)
484 484
485 cfg = &pci_mmcfg_config[i]; 485 cfg = &pci_mmcfg_config[i];
486 addr = cfg->address + 486 addr = cfg->address +
487 PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number); 487 PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
488 num_buses = cfg->end_bus_number - cfg->start_bus_number + 1; 488 num_buses = cfg->end_bus - cfg->start_bus + 1;
489 size = PCI_MMCFG_BUS_OFFSET(num_buses); 489 size = PCI_MMCFG_BUS_OFFSET(num_buses);
490 printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx " 490 printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx "
491 "segment %hu buses %u - %u\n", 491 "segment %hu buses %u - %u\n",
492 i, (unsigned long)cfg->address, cfg->pci_segment, 492 i, (unsigned long)cfg->address, cfg->segment,
493 (unsigned int)cfg->start_bus_number, 493 (unsigned int)cfg->start_bus,
494 (unsigned int)cfg->end_bus_number); 494 (unsigned int)cfg->end_bus);
495 495
496 if (!early && !acpi_disabled) 496 if (!early && !acpi_disabled)
497 valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0); 497 valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0);