diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-26 06:18:00 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-26 06:18:00 -0400 |
| commit | 45de6fd958d7f407bdb5fdc6914b3262519d891c (patch) | |
| tree | c1b9f9023e93d0f28f773ca4be41d107f79cd600 /arch/powerpc/sysdev/dart_iommu.c | |
| parent | 1f5d5dbf0372dd933d8325054889ba09d996e50b (diff) | |
| parent | 3b908870b8332dfd40be0e919e187aa4991536fb (diff) | |
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'arch/powerpc/sysdev/dart_iommu.c')
| -rw-r--r-- | arch/powerpc/sysdev/dart_iommu.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 61d31742861..38087bd6e3c 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c @@ -49,6 +49,7 @@ #include "dart.h" +extern int iommu_is_off; extern int iommu_force_on; /* Physical base address and size of the DART table */ @@ -329,10 +330,17 @@ void iommu_init_early_dart(void) void __init alloc_dart_table(void) { - /* Only reserve DART space if machine has more than 2GB of RAM + /* Only reserve DART space if machine has more than 1GB of RAM * or if requested with iommu=on on cmdline. + * + * 1GB of RAM is picked as limit because some default devices + * (i.e. Airport Extreme) have 30 bit address range limits. */ - if (lmb_end_of_DRAM() <= 0x80000000ull && !iommu_force_on) + + if (iommu_is_off) + return; + + if (!iommu_force_on && lmb_end_of_DRAM() <= 0x40000000ull) return; /* 512 pages (2MB) is max DART tablesize. */ |
