Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181000
b: refs/heads/master
c: bb8d413
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Jesse Barnes committed Feb 25, 2010
1 parent a6693d6 commit 0be8ab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: cbbc0de700e61d0cdc854d435dbc2ef148de0e00
refs/heads/master: bb8d41330ce27edb91adb6922d3f8e1a8923f727
17 changes: 6 additions & 11 deletions trunk/arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,22 +303,17 @@ static void __init pci_mmcfg_check_end_bus_number(void)
{
struct pci_mmcfg_region *cfg, *cfgx;

/* last one*/
cfg = list_entry(pci_mmcfg_list.prev, typeof(*cfg), list);
if (cfg)
if (cfg->end_bus < cfg->start_bus)
cfg->end_bus = 255;

if (list_is_singular(&pci_mmcfg_list))
return;

/* don't overlap please */
/* Fixup overlaps */
list_for_each_entry(cfg, &pci_mmcfg_list, list) {
if (cfg->end_bus < cfg->start_bus)
cfg->end_bus = 255;

/* Don't access the list head ! */
if (cfg->list.next == &pci_mmcfg_list)
break;

cfgx = list_entry(cfg->list.next, typeof(*cfg), list);
if (cfg != cfgx && cfg->end_bus >= cfgx->start_bus)
if (cfg->end_bus >= cfgx->start_bus)
cfg->end_bus = cfgx->start_bus - 1;
}
}
Expand Down

0 comments on commit 0be8ab4

Please sign in to comment.