diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-11-13 19:34:18 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-24 18:29:24 -0500 |
commit | d7e6b66fe87c9f42480d73fc314aecaeae84ca6b (patch) | |
tree | 0d8f33a6df0c684f6b7da1e7cbfaf7771cde5bee /arch/x86 | |
parent | d215a9c8b46e55a1d3bc1cd907c943ef95938a0e (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')
-rw-r--r-- | arch/x86/include/asm/pci_x86.h | 6 | ||||
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 50 | ||||
-rw-r--r-- | arch/x86/pci/mmconfig_32.c | 6 | ||||
-rw-r--r-- | arch/x86/pci/mmconfig_64.c | 16 |
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); | |||
120 | 120 | ||
121 | struct pci_mmcfg_region { | 121 | struct pci_mmcfg_region { |
122 | u64 address; | 122 | u64 address; |
123 | u16 pci_segment; | 123 | u16 segment; |
124 | u8 start_bus_number; | 124 | u8 start_bus; |
125 | u8 end_bus_number; | 125 | u8 end_bus; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | extern int __init pci_mmcfg_arch_init(void); | 128 | 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, | |||
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); |
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) | |||
32 | 32 | ||
33 | for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) { | 33 | for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) { |
34 | cfg = &pci_mmcfg_config[cfg_num]; | 34 | cfg = &pci_mmcfg_config[cfg_num]; |
35 | if (cfg->pci_segment == seg && | 35 | if (cfg->segment == seg && |
36 | (cfg->start_bus_number <= bus) && | 36 | (cfg->start_bus <= bus) && |
37 | (cfg->end_bus_number >= bus)) | 37 | (cfg->end_bus >= bus)) |
38 | return cfg->address; | 38 | return cfg->address; |
39 | } | 39 | } |
40 | 40 | ||
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) | |||
26 | 26 | ||
27 | for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) { | 27 | for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) { |
28 | cfg = pci_mmcfg_virt[cfg_num].cfg; | 28 | cfg = pci_mmcfg_virt[cfg_num].cfg; |
29 | if (cfg->pci_segment == seg && | 29 | if (cfg->segment == seg && |
30 | (cfg->start_bus_number <= bus) && | 30 | (cfg->start_bus <= bus) && |
31 | (cfg->end_bus_number >= bus)) | 31 | (cfg->end_bus >= bus)) |
32 | return pci_mmcfg_virt[cfg_num].virt; | 32 | return pci_mmcfg_virt[cfg_num].virt; |
33 | } | 33 | } |
34 | 34 | ||
@@ -115,14 +115,14 @@ static void __iomem * __init mcfg_ioremap(struct pci_mmcfg_region *cfg) | |||
115 | u64 start, size; | 115 | u64 start, size; |
116 | int num_buses; | 116 | int num_buses; |
117 | 117 | ||
118 | start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number); | 118 | start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus); |
119 | num_buses = cfg->end_bus_number - cfg->start_bus_number + 1; | 119 | num_buses = cfg->end_bus - cfg->start_bus + 1; |
120 | size = PCI_MMCFG_BUS_OFFSET(num_buses); | 120 | size = PCI_MMCFG_BUS_OFFSET(num_buses); |
121 | addr = ioremap_nocache(start, size); | 121 | addr = ioremap_nocache(start, size); |
122 | if (addr) { | 122 | if (addr) { |
123 | printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n", | 123 | printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n", |
124 | start, start + size - 1); | 124 | start, start + size - 1); |
125 | addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus_number); | 125 | addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus); |
126 | } | 126 | } |
127 | return addr; | 127 | return addr; |
128 | } | 128 | } |
@@ -143,7 +143,7 @@ int __init pci_mmcfg_arch_init(void) | |||
143 | if (!pci_mmcfg_virt[i].virt) { | 143 | if (!pci_mmcfg_virt[i].virt) { |
144 | printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " | 144 | printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " |
145 | "segment %d\n", | 145 | "segment %d\n", |
146 | pci_mmcfg_config[i].pci_segment); | 146 | pci_mmcfg_config[i].segment); |
147 | pci_mmcfg_arch_free(); | 147 | pci_mmcfg_arch_free(); |
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
@@ -161,7 +161,7 @@ void __init pci_mmcfg_arch_free(void) | |||
161 | 161 | ||
162 | for (i = 0; i < pci_mmcfg_config_num; ++i) { | 162 | for (i = 0; i < pci_mmcfg_config_num; ++i) { |
163 | if (pci_mmcfg_virt[i].virt) { | 163 | if (pci_mmcfg_virt[i].virt) { |
164 | iounmap(pci_mmcfg_virt[i].virt + PCI_MMCFG_BUS_OFFSET(pci_mmcfg_virt[i].cfg->start_bus_number)); | 164 | iounmap(pci_mmcfg_virt[i].virt + PCI_MMCFG_BUS_OFFSET(pci_mmcfg_virt[i].cfg->start_bus)); |
165 | pci_mmcfg_virt[i].virt = NULL; | 165 | pci_mmcfg_virt[i].virt = NULL; |
166 | pci_mmcfg_virt[i].cfg = NULL; | 166 | pci_mmcfg_virt[i].cfg = NULL; |
167 | } | 167 | } |