aboutsummaryrefslogtreecommitdiff
path: root/include/asm-ppc64
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2005-09-20 13:46:44 +1000
committerPaul Mackerras <paulus@samba.org>2005-09-21 19:21:07 +1000
commitd0035c62d9145a2ce3057c8182a7ff0b4921a41c (patch)
tree0a55703d5e71668f61439649f4963daba55401c3 /include/asm-ppc64
parentc707ffcf3a44914f30e5f2fd53089ad5586c9e42 (diff)
[PATCH] ppc64: Updated Olof iommu updates 2/3
There are potential cases in the future where the IOMMU might be mapping smaller pages than the regular MMU is using. Keep the allocator working on MMU pagesizes, but the low-level mapping functions need to map more than one TCE entry per page to deal with this. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r--include/asm-ppc64/dart.h4
-rw-r--r--include/asm-ppc64/tce.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-ppc64/dart.h b/include/asm-ppc64/dart.h
index 306799a31a5..a9000de8a2e 100644
--- a/include/asm-ppc64/dart.h
+++ b/include/asm-ppc64/dart.h
@@ -51,5 +51,9 @@
#define DARTMAP_RPNMASK 0x00ffffff
+#define DART_SHIFT 12
+#define DART_PAGE_SIZE (1 << DART_SHIFT)
+#define DART_PAGE_FACTOR (PAGE_SHIFT - DART_SHIFT)
+
#endif
diff --git a/include/asm-ppc64/tce.h b/include/asm-ppc64/tce.h
index 636504c62c8..d40b6b42ab3 100644
--- a/include/asm-ppc64/tce.h
+++ b/include/asm-ppc64/tce.h
@@ -28,6 +28,13 @@
#define TCE_VB 0
#define TCE_PCI 1
+/* TCE page size is 4096 bytes (1 << 12) */
+
+#define TCE_SHIFT 12
+#define TCE_PAGE_SIZE (1 << TCE_SHIFT)
+#define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT)
+
+
/* tce_entry
* Used by pSeries (SMP) and iSeries/pSeries LPAR, but there it's
* abstracted so layout is irrelevant.