diff options
author | Tejun Heo <tj@kernel.org> | 2010-01-04 19:17:33 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-01-04 19:17:33 -0500 |
commit | 32032df6c2f6c9c6b2ada2ce42322231824f70c2 (patch) | |
tree | b1ce838a37044bb38dfc128e2116ca35630e629a /arch/x86/kernel/aperture_64.c | |
parent | 22b737f4c75197372d64afc6ed1bccd58c00e549 (diff) | |
parent | c5974b835a909ff15c3b7e6cf6789b5eb919f419 (diff) |
Merge branch 'master' into percpu
Conflicts:
arch/powerpc/platforms/pseries/hvCall.S
include/linux/percpu.h
Diffstat (limited to 'arch/x86/kernel/aperture_64.c')
-rw-r--r-- | arch/x86/kernel/aperture_64.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 128111d8ffe0..3704997e8b25 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/pci-direct.h> | 28 | #include <asm/pci-direct.h> |
29 | #include <asm/dma.h> | 29 | #include <asm/dma.h> |
30 | #include <asm/k8.h> | 30 | #include <asm/k8.h> |
31 | #include <asm/x86_init.h> | ||
31 | 32 | ||
32 | int gart_iommu_aperture; | 33 | int gart_iommu_aperture; |
33 | int gart_iommu_aperture_disabled __initdata; | 34 | int gart_iommu_aperture_disabled __initdata; |
@@ -279,7 +280,8 @@ void __init early_gart_iommu_check(void) | |||
279 | * or BIOS forget to put that in reserved. | 280 | * or BIOS forget to put that in reserved. |
280 | * try to update e820 to make that region as reserved. | 281 | * try to update e820 to make that region as reserved. |
281 | */ | 282 | */ |
282 | int i, fix, slot; | 283 | u32 agp_aper_base = 0, agp_aper_order = 0; |
284 | int i, fix, slot, valid_agp = 0; | ||
283 | u32 ctl; | 285 | u32 ctl; |
284 | u32 aper_size = 0, aper_order = 0, last_aper_order = 0; | 286 | u32 aper_size = 0, aper_order = 0, last_aper_order = 0; |
285 | u64 aper_base = 0, last_aper_base = 0; | 287 | u64 aper_base = 0, last_aper_base = 0; |
@@ -289,6 +291,8 @@ void __init early_gart_iommu_check(void) | |||
289 | return; | 291 | return; |
290 | 292 | ||
291 | /* This is mostly duplicate of iommu_hole_init */ | 293 | /* This is mostly duplicate of iommu_hole_init */ |
294 | agp_aper_base = search_agp_bridge(&agp_aper_order, &valid_agp); | ||
295 | |||
292 | fix = 0; | 296 | fix = 0; |
293 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { | 297 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { |
294 | int bus; | 298 | int bus; |
@@ -341,10 +345,10 @@ void __init early_gart_iommu_check(void) | |||
341 | } | 345 | } |
342 | } | 346 | } |
343 | 347 | ||
344 | if (!fix) | 348 | if (valid_agp) |
345 | return; | 349 | return; |
346 | 350 | ||
347 | /* different nodes have different setting, disable them all at first*/ | 351 | /* disable them all at first */ |
348 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { | 352 | for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { |
349 | int bus; | 353 | int bus; |
350 | int dev_base, dev_limit; | 354 | int dev_base, dev_limit; |
@@ -400,6 +404,7 @@ void __init gart_iommu_hole_init(void) | |||
400 | 404 | ||
401 | iommu_detected = 1; | 405 | iommu_detected = 1; |
402 | gart_iommu_aperture = 1; | 406 | gart_iommu_aperture = 1; |
407 | x86_init.iommu.iommu_init = gart_iommu_init; | ||
403 | 408 | ||
404 | aper_order = (read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL) >> 1) & 7; | 409 | aper_order = (read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL) >> 1) & 7; |
405 | aper_size = (32 * 1024 * 1024) << aper_order; | 410 | aper_size = (32 * 1024 * 1024) << aper_order; |
@@ -456,8 +461,6 @@ out: | |||
456 | 461 | ||
457 | if (aper_alloc) { | 462 | if (aper_alloc) { |
458 | /* Got the aperture from the AGP bridge */ | 463 | /* Got the aperture from the AGP bridge */ |
459 | } else if (swiotlb && !valid_agp) { | ||
460 | /* Do nothing */ | ||
461 | } else if ((!no_iommu && max_pfn > MAX_DMA32_PFN) || | 464 | } else if ((!no_iommu && max_pfn > MAX_DMA32_PFN) || |
462 | force_iommu || | 465 | force_iommu || |
463 | valid_agp || | 466 | valid_agp || |