aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-11-13 19:34:13 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-24 18:29:17 -0500
commitd215a9c8b46e55a1d3bc1cd907c943ef95938a0e (patch)
treee377a5f8995fdc83bf333d7f6cee69b59447d686 /arch/x86/pci
parentdf5eb1d67e8074dfbc23cf396c556116728187b3 (diff)
x86/PCI: MMCONFIG: use a private structure rather than the ACPI MCFG one
This adds a struct pci_mmcfg_region with a little more information than the struct acpi_mcfg_allocation used previously. The acpi_mcfg structure is defined by the spec, so we can't change it. To begin with, struct pci_mmcfg_region is basically the same as the ACPI MCFG version, but future patches will add more information. 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')
-rw-r--r--arch/x86/pci/mmconfig-shared.c10
-rw-r--r--arch/x86/pci/mmconfig_32.c2
-rw-r--r--arch/x86/pci/mmconfig_64.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 4820f0e8c59..5f7afdd1e2d 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -34,10 +34,10 @@ static __init void free_all_mmcfg(void)
34 pci_mmcfg_config = NULL; 34 pci_mmcfg_config = NULL;
35} 35}
36 36
37static __init struct acpi_mcfg_allocation *pci_mmconfig_add(int segment, 37static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
38 int start, int end, u64 addr) 38 int end, u64 addr)
39{ 39{
40 struct acpi_mcfg_allocation *new; 40 struct pci_mmcfg_region *new;
41 int new_num = pci_mmcfg_config_num + 1; 41 int new_num = pci_mmcfg_config_num + 1;
42 int i = pci_mmcfg_config_num; 42 int i = pci_mmcfg_config_num;
43 43
@@ -349,7 +349,7 @@ static void __init pci_mmcfg_insert_resources(void)
349 349
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 acpi_mcfg_allocation *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_number - cfg->start_bus_number + 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,
@@ -523,7 +523,7 @@ reject:
523static int __initdata known_bridge; 523static int __initdata known_bridge;
524 524
525/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ 525/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */
526struct acpi_mcfg_allocation *pci_mmcfg_config; 526struct pci_mmcfg_region *pci_mmcfg_config;
527int pci_mmcfg_config_num; 527int pci_mmcfg_config_num;
528 528
529static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg, 529static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg,
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index 8c19df89ad7..3936eced993 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -27,7 +27,7 @@ static int mmcfg_last_accessed_cpu;
27 */ 27 */
28static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) 28static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
29{ 29{
30 struct acpi_mcfg_allocation *cfg; 30 struct pci_mmcfg_region *cfg;
31 int cfg_num; 31 int cfg_num;
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++) {
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
index 8588711924c..7a6231c3335 100644
--- a/arch/x86/pci/mmconfig_64.c
+++ b/arch/x86/pci/mmconfig_64.c
@@ -14,14 +14,14 @@
14 14
15/* Static virtual mapping of the MMCONFIG aperture */ 15/* Static virtual mapping of the MMCONFIG aperture */
16struct mmcfg_virt { 16struct mmcfg_virt {
17 struct acpi_mcfg_allocation *cfg; 17 struct pci_mmcfg_region *cfg;
18 char __iomem *virt; 18 char __iomem *virt;
19}; 19};
20static struct mmcfg_virt *pci_mmcfg_virt; 20static struct mmcfg_virt *pci_mmcfg_virt;
21 21
22static char __iomem *get_virt(unsigned int seg, unsigned bus) 22static char __iomem *get_virt(unsigned int seg, unsigned bus)
23{ 23{
24 struct acpi_mcfg_allocation *cfg; 24 struct pci_mmcfg_region *cfg;
25 int cfg_num; 25 int cfg_num;
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++) {
@@ -109,7 +109,7 @@ static struct pci_raw_ops pci_mmcfg = {
109 .write = pci_mmcfg_write, 109 .write = pci_mmcfg_write,
110}; 110};
111 111
112static void __iomem * __init mcfg_ioremap(struct acpi_mcfg_allocation *cfg) 112static void __iomem * __init mcfg_ioremap(struct pci_mmcfg_region *cfg)
113{ 113{
114 void __iomem *addr; 114 void __iomem *addr;
115 u64 start, size; 115 u64 start, size;