aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-11-11 01:25:18 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:39:02 -0500
commit165785e5c0be3ad43e8b8eadfbd25e92c2cd002a (patch)
treee582b911574b193544aa3aaf5527fd9311d3c108 /include/asm-powerpc
parentacfd946a1aaffdec346c2864f596d4d92125d1ad (diff)
[POWERPC] Cell iommu support
This patch adds full cell iommu support (and iommu disabled mode). It implements mapping/unmapping of iommu pages on demand using the standard powerpc iommu framework. It also supports running with iommu disabled for machines with less than 2GB of memory. (The default is off in that case, though it can be forced on with the kernel command line option iommu=force). Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/iommu.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h
index 19403183dbbc..f85dbd305558 100644
--- a/include/asm-powerpc/iommu.h
+++ b/include/asm-powerpc/iommu.h
@@ -34,7 +34,9 @@
34#define IOMMU_PAGE_MASK (~((1 << IOMMU_PAGE_SHIFT) - 1)) 34#define IOMMU_PAGE_MASK (~((1 << IOMMU_PAGE_SHIFT) - 1))
35#define IOMMU_PAGE_ALIGN(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE) 35#define IOMMU_PAGE_ALIGN(addr) _ALIGN_UP(addr, IOMMU_PAGE_SIZE)
36 36
37#ifndef __ASSEMBLY__ 37/* Boot time flags */
38extern int iommu_is_off;
39extern int iommu_force_on;
38 40
39/* Pure 2^n version of get_order */ 41/* Pure 2^n version of get_order */
40static __inline__ __attribute_const__ int get_iommu_order(unsigned long size) 42static __inline__ __attribute_const__ int get_iommu_order(unsigned long size)
@@ -42,8 +44,6 @@ static __inline__ __attribute_const__ int get_iommu_order(unsigned long size)
42 return __ilog2((size - 1) >> IOMMU_PAGE_SHIFT) + 1; 44 return __ilog2((size - 1) >> IOMMU_PAGE_SHIFT) + 1;
43} 45}
44 46
45#endif /* __ASSEMBLY__ */
46
47 47
48/* 48/*
49 * IOMAP_MAX_ORDER defines the largest contiguous block 49 * IOMAP_MAX_ORDER defines the largest contiguous block