Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316433
b: refs/heads/master
c: a10bb12
h: refs/heads/master
i:
  316431: 613b039
v: v3
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Jun 13, 2012
1 parent 608e5bc commit fe32bc9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c1d81d160cc46e36fdd06702885c98c2643b4c5
refs/heads/master: a10bb128b64fe03198c4930f4483dda55c5c84eb
7 changes: 3 additions & 4 deletions trunk/arch/x86/pci/amd_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ static int __init early_fill_mp_bus_info(void)
link = (reg >> 8) & 0x03;

info = alloc_pci_root_info(min_bus, max_bus, node, link);
sprintf(info->name, "PCI Bus #%02x", min_bus);
}

/* get the default node and link for left over res */
Expand Down Expand Up @@ -300,9 +299,9 @@ static int __init early_fill_mp_bus_info(void)
int busnum;
struct pci_root_res *root_res;

busnum = info->bus_min;
printk(KERN_DEBUG "bus: [%02x, %02x] on node %x link %x\n",
info->bus_min, info->bus_max, info->node, info->link);
busnum = info->busn.start;
printk(KERN_DEBUG "bus: %pR on node %x link %x\n",
&info->busn, info->node, info->link);
list_for_each_entry(root_res, &info->resources, list)
printk(KERN_DEBUG "bus: %02x %pR\n",
busnum, &root_res->res);
Expand Down
22 changes: 19 additions & 3 deletions trunk/arch/x86/pci/bus_numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static struct pci_root_info *x86_find_pci_root_info(int bus)
return NULL;

list_for_each_entry(info, &pci_root_infos, list)
if (info->bus_min == bus)
if (info->busn.start == bus)
return info;

return NULL;
Expand All @@ -24,13 +24,25 @@ void x86_pci_root_bus_resources(int bus, struct list_head *resources)
{
struct pci_root_info *info = x86_find_pci_root_info(bus);
struct pci_root_res *root_res;
struct pci_host_bridge_window *window;
bool found = false;

if (!info)
goto default_resources;

printk(KERN_DEBUG "PCI: root bus %02x: hardware-probed resources\n",
bus);

/* already added by acpi ? */
list_for_each_entry(window, resources, list)
if (window->res->flags & IORESOURCE_BUS) {
found = true;
break;
}

if (!found)
pci_add_resource(resources, &info->busn);

list_for_each_entry(root_res, &info->resources, list) {
struct resource *res;
struct resource *root;
Expand Down Expand Up @@ -66,9 +78,13 @@ struct pci_root_info __init *alloc_pci_root_info(int bus_min, int bus_max,
if (!info)
return info;

sprintf(info->name, "PCI Bus #%02x", bus_min);

INIT_LIST_HEAD(&info->resources);
info->bus_min = bus_min;
info->bus_max = bus_max;
info->busn.name = info->name;
info->busn.start = bus_min;
info->busn.end = bus_max;
info->busn.flags = IORESOURCE_BUS;
info->node = node;
info->link = link;

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/x86/pci/bus_numa.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ struct pci_root_info {
struct list_head list;
char name[12];
struct list_head resources;
int bus_min;
int bus_max;
struct resource busn;
int node;
int link;
};
Expand Down

0 comments on commit fe32bc9

Please sign in to comment.