aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/dart_iommu.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-04-26 06:15:27 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-26 06:15:27 -0400
commit25f73891c3059e9ce6ff0a02670aa98baf6cbce9 (patch)
tree18a2ef934aa353ca695c3faaa3b7497fea22037a /arch/powerpc/sysdev/dart_iommu.c
parent[PATCH] Fix locking in gianfar (diff)
parent[PATCH] Alpha: strncpy() fix (diff)
downloadlinux-dev-25f73891c3059e9ce6ff0a02670aa98baf6cbce9.tar.xz
linux-dev-25f73891c3059e9ce6ff0a02670aa98baf6cbce9.zip
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'arch/powerpc/sysdev/dart_iommu.c')
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index 61d317428610..38087bd6e3cf 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. */