diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/aperture_64.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/pci-gart_64.c | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index f147a95fd84a..19f2c703638e 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -394,6 +394,7 @@ void __init gart_iommu_hole_init(void) | |||
394 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { | 394 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { |
395 | int bus; | 395 | int bus; |
396 | int dev_base, dev_limit; | 396 | int dev_base, dev_limit; |
397 | u32 ctl; | ||
397 | 398 | ||
398 | bus = bus_dev_ranges[i].bus; | 399 | bus = bus_dev_ranges[i].bus; |
399 | dev_base = bus_dev_ranges[i].dev_base; | 400 | dev_base = bus_dev_ranges[i].dev_base; |
@@ -407,7 +408,19 @@ void __init gart_iommu_hole_init(void) | |||
407 | gart_iommu_aperture = 1; | 408 | gart_iommu_aperture = 1; |
408 | x86_init.iommu.iommu_init = gart_iommu_init; | 409 | x86_init.iommu.iommu_init = gart_iommu_init; |
409 | 410 | ||
410 | aper_order = (read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL) >> 1) & 7; | 411 | ctl = read_pci_config(bus, slot, 3, |
412 | AMD64_GARTAPERTURECTL); | ||
413 | |||
414 | /* | ||
415 | * Before we do anything else disable the GART. It may | ||
416 | * still be enabled if we boot into a crash-kernel here. | ||
417 | * Reconfiguring the GART while it is enabled could have | ||
418 | * unknown side-effects. | ||
419 | */ | ||
420 | ctl &= ~GARTEN; | ||
421 | write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, ctl); | ||
422 | |||
423 | aper_order = (ctl >> 1) & 7; | ||
411 | aper_size = (32 * 1024 * 1024) << aper_order; | 424 | aper_size = (32 * 1024 * 1024) << aper_order; |
412 | aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff; | 425 | aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff; |
413 | aper_base <<= 25; | 426 | aper_base <<= 25; |
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index 34de53b46f87..4f41b29fde98 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -564,6 +564,9 @@ static void enable_gart_translations(void) | |||
564 | 564 | ||
565 | enable_gart_translation(dev, __pa(agp_gatt_table)); | 565 | enable_gart_translation(dev, __pa(agp_gatt_table)); |
566 | } | 566 | } |
567 | |||
568 | /* Flush the GART-TLB to remove stale entries */ | ||
569 | k8_flush_garts(); | ||
567 | } | 570 | } |
568 | 571 | ||
569 | /* | 572 | /* |