Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99451
b: refs/heads/master
c: fa5b8a3
h: refs/heads/master
i:
  99449: d3e8453
  99447: b01849b
v: v3
  • Loading branch information
Pavel Machek authored and Thomas Gleixner committed Jun 5, 2008
1 parent 19904ae commit 1c67889
Show file tree
Hide file tree
Showing 2 changed files with 13 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: dd564d0cf08686cf0cc332bf9d48cba5b26a8171
refs/heads/master: fa5b8a30cf03520737e9a0ee2ee03a61b2eccf05
21 changes: 12 additions & 9 deletions trunk/arch/x86/kernel/aperture_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,16 @@ void __init early_gart_iommu_check(void)
* or BIOS forget to put that in reserved.
* try to update e820 to make that region as reserved.
*/
int fix, slot;
int i, fix, slot;
u32 ctl;
u32 aper_size = 0, aper_order = 0, last_aper_order = 0;
u64 aper_base = 0, last_aper_base = 0;
int aper_enabled = 0, last_aper_enabled = 0;
int i;
int aper_enabled = 0, last_aper_enabled = 0, last_valid = 0;

if (!early_pci_allowed())
return;

/* This is mostly duplicate of iommu_hole_init */
fix = 0;
for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
int bus;
Expand All @@ -301,19 +301,22 @@ void __init early_gart_iommu_check(void)
aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff;
aper_base <<= 25;

if ((last_aper_order && aper_order != last_aper_order) ||
(last_aper_base && aper_base != last_aper_base) ||
(last_aper_enabled && aper_enabled != last_aper_enabled)) {
fix = 1;
goto out;
if (last_valid) {
if ((aper_order != last_aper_order) ||
(aper_base != last_aper_base) ||
(aper_enabled != last_aper_enabled)) {
fix = 1;
break;
}
}

last_aper_order = aper_order;
last_aper_base = aper_base;
last_aper_enabled = aper_enabled;
last_valid = 1;
}
}

out:
if (!fix && !aper_enabled)
return;

Expand Down

0 comments on commit 1c67889

Please sign in to comment.