summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/pgtable.h
diff options
context:
space:
mode:
authorDavid Gibson2005-12-14 06:08:40 +0100
committerPaul Mackerras2006-01-09 05:05:47 +0100
commit14c89e7fc84ae55354b8bf12fee1b6d14f259c8a (patch)
tree83d6bbd44499d81e927bbe743f1a212ff5d30b51 /include/asm-powerpc/pgtable.h
parent[PATCH] powerpc: Fix g5 DART init (diff)
downloadkernel-qcow2-linux-14c89e7fc84ae55354b8bf12fee1b6d14f259c8a.tar.gz
kernel-qcow2-linux-14c89e7fc84ae55354b8bf12fee1b6d14f259c8a.tar.xz
kernel-qcow2-linux-14c89e7fc84ae55354b8bf12fee1b6d14f259c8a.zip
[PATCH] powerpc: Replace VMALLOCBASE with VMALLOC_START
On ppc64, we independently define VMALLOCBASE and VMALLOC_START to be the same thing: the start of the vmalloc() area at 0xd000000000000000. VMALLOC_START is used much more widely, including in generic code, so this patch gets rid of the extraneous VMALLOCBASE. This does require moving the definitions of region IDs from page_64.h to pgtable.h, but they don't clearly belong in the former rather than the latter, anyway. While we're moving them, clean up the definitions of the REGION_IDs: - Abolish REGION_SIZE, it was only used once, to define REGION_MASK anyway - Define the specific region ids in terms of the REGION_ID() macro. - Define KERNEL_REGION_ID in terms of PAGE_OFFSET rather than KERNELBASE. It amounts to the same thing, but conceptually this is about the region of the linear mapping (which starts at PAGE_OFFSET) rather than of the kernel text itself (which is at KERNELBASE). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/pgtable.h')
-rw-r--r--include/asm-powerpc/pgtable.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h
index 0303f57366c1..3518adb2cc18 100644
--- a/include/asm-powerpc/pgtable.h
+++ b/include/asm-powerpc/pgtable.h
@@ -58,6 +58,17 @@ struct mm_struct;
#define IMALLOC_END (VMALLOC_START + PGTABLE_RANGE)
/*
+ * Region IDs
+ */
+#define REGION_SHIFT 60UL
+#define REGION_MASK (0xfUL << REGION_SHIFT)
+#define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT)
+
+#define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START))
+#define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET))
+#define USER_REGION_ID (0UL)
+
+/*
* Common bits in a linux-style PTE. These match the bits in the
* (hardware-defined) PowerPC PTE as closely as possible. Additional
* bits may be defined in pgtable-*.h