Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189950
b: refs/heads/master
c: 4b83873
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel committed Apr 7, 2010
1 parent a335be4 commit 166da6e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 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: 39a37ce1cc5eef420604fa68b776ff5dab400340
refs/heads/master: 4b83873d3da0704987cb116833818ed96214ee29
15 changes: 14 additions & 1 deletion trunk/arch/x86/kernel/aperture_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ void __init gart_iommu_hole_init(void)
for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
int bus;
int dev_base, dev_limit;
u32 ctl;

bus = bus_dev_ranges[i].bus;
dev_base = bus_dev_ranges[i].dev_base;
Expand All @@ -406,7 +407,19 @@ void __init gart_iommu_hole_init(void)
gart_iommu_aperture = 1;
x86_init.iommu.iommu_init = gart_iommu_init;

aper_order = (read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL) >> 1) & 7;
ctl = read_pci_config(bus, slot, 3,
AMD64_GARTAPERTURECTL);

/*
* Before we do anything else disable the GART. It may
* still be enabled if we boot into a crash-kernel here.
* Reconfiguring the GART while it is enabled could have
* unknown side-effects.
*/
ctl &= ~GARTEN;
write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, ctl);

aper_order = (ctl >> 1) & 7;
aper_size = (32 * 1024 * 1024) << aper_order;
aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff;
aper_base <<= 25;
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/kernel/pci-gart_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,9 @@ static void enable_gart_translations(void)

enable_gart_translation(dev, __pa(agp_gatt_table));
}

/* Flush the GART-TLB to remove stale entries */
k8_flush_garts();
}

/*
Expand Down

0 comments on commit 166da6e

Please sign in to comment.