diff options
Diffstat (limited to 'arch/x86/pci/bus_numa.c')
-rw-r--r-- | arch/x86/pci/bus_numa.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c index 306579f7d0fd..d37e2fec97e5 100644 --- a/arch/x86/pci/bus_numa.c +++ b/arch/x86/pci/bus_numa.c | |||
@@ -14,7 +14,7 @@ static struct pci_root_info *x86_find_pci_root_info(int bus) | |||
14 | return NULL; | 14 | return NULL; |
15 | 15 | ||
16 | list_for_each_entry(info, &pci_root_infos, list) | 16 | list_for_each_entry(info, &pci_root_infos, list) |
17 | if (info->bus_min == bus) | 17 | if (info->busn.start == bus) |
18 | return info; | 18 | return info; |
19 | 19 | ||
20 | return NULL; | 20 | return NULL; |
@@ -24,6 +24,8 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources) | |||
24 | { | 24 | { |
25 | struct pci_root_info *info = x86_find_pci_root_info(bus); | 25 | struct pci_root_info *info = x86_find_pci_root_info(bus); |
26 | struct pci_root_res *root_res; | 26 | struct pci_root_res *root_res; |
27 | struct pci_host_bridge_window *window; | ||
28 | bool found = false; | ||
27 | 29 | ||
28 | if (!info) | 30 | if (!info) |
29 | goto default_resources; | 31 | goto default_resources; |
@@ -31,6 +33,16 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources) | |||
31 | printk(KERN_DEBUG "PCI: root bus %02x: hardware-probed resources\n", | 33 | printk(KERN_DEBUG "PCI: root bus %02x: hardware-probed resources\n", |
32 | bus); | 34 | bus); |
33 | 35 | ||
36 | /* already added by acpi ? */ | ||
37 | list_for_each_entry(window, resources, list) | ||
38 | if (window->res->flags & IORESOURCE_BUS) { | ||
39 | found = true; | ||
40 | break; | ||
41 | } | ||
42 | |||
43 | if (!found) | ||
44 | pci_add_resource(resources, &info->busn); | ||
45 | |||
34 | list_for_each_entry(root_res, &info->resources, list) { | 46 | list_for_each_entry(root_res, &info->resources, list) { |
35 | struct resource *res; | 47 | struct resource *res; |
36 | struct resource *root; | 48 | struct resource *root; |
@@ -66,9 +78,13 @@ struct pci_root_info __init *alloc_pci_root_info(int bus_min, int bus_max, | |||
66 | if (!info) | 78 | if (!info) |
67 | return info; | 79 | return info; |
68 | 80 | ||
81 | sprintf(info->name, "PCI Bus #%02x", bus_min); | ||
82 | |||
69 | INIT_LIST_HEAD(&info->resources); | 83 | INIT_LIST_HEAD(&info->resources); |
70 | info->bus_min = bus_min; | 84 | info->busn.name = info->name; |
71 | info->bus_max = bus_max; | 85 | info->busn.start = bus_min; |
86 | info->busn.end = bus_max; | ||
87 | info->busn.flags = IORESOURCE_BUS; | ||
72 | info->node = node; | 88 | info->node = node; |
73 | info->link = link; | 89 | info->link = link; |
74 | 90 | ||