Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316498
b: refs/heads/master
c: 846e402
h: refs/heads/master
v: v3
  • Loading branch information
Jiang Liu authored and Bjorn Helgaas committed Jun 22, 2012
1 parent 140a7d6 commit 4f36c8c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 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: 2a76c450bd0377f715caf313ded530290d7dc7d7
refs/heads/master: 846e402300ffa2131239dcf82265b5366cd755f4
19 changes: 15 additions & 4 deletions trunk/arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ static __init void list_add_sorted(struct pci_mmcfg_region *new)
list_add_tail(&new->list, &pci_mmcfg_list);
}

static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
int end, u64 addr)
static __devinit struct pci_mmcfg_region *pci_mmconfig_alloc(int segment,
int start,
int end, u64 addr)
{
struct pci_mmcfg_region *new;
struct resource *res;
Expand All @@ -79,8 +80,6 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
new->start_bus = start;
new->end_bus = end;

list_add_sorted(new);

res = &new->res;
res->start = addr + PCI_MMCFG_BUS_OFFSET(start);
res->end = addr + PCI_MMCFG_BUS_OFFSET(end + 1) - 1;
Expand All @@ -96,6 +95,18 @@ static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
return new;
}

static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
int end, u64 addr)
{
struct pci_mmcfg_region *new;

new = pci_mmconfig_alloc(segment, start, end, addr);
if (new)
list_add_sorted(new);

return new;
}

struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus)
{
struct pci_mmcfg_region *cfg;
Expand Down

0 comments on commit 4f36c8c

Please sign in to comment.