[PATCH 4/12] ppc64: Rename VMALLOCBASE to VMALLOC_OFFSET

Michael Ellerman michael at ellerman.id.au
Fri Aug 26 12:53:22 EST 2005


VMALLOCBASE would seem to be similar to KERNELBASE, but in fact it's not,
it's more like PAGE_OFFSET, so rename it to avoid confusion.

Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---

 arch/ppc64/kernel/lparmap.c |    4 ++--
 arch/ppc64/mm/slb.c         |    6 +++---
 include/asm-ppc64/page.h    |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

Index: work/arch/ppc64/mm/slb.c
===================================================================
--- work.orig/arch/ppc64/mm/slb.c
+++ work/arch/ppc64/mm/slb.c
@@ -67,8 +67,8 @@ static void slb_flush_and_rebolt(void)
 		     /* Slot 2 - kernel stack */
 		     "slbmte	%2,%3\n"
 		     "isync"
-		     :: "r"(mk_vsid_data(VMALLOCBASE, SLB_VSID_KERNEL)),
-		        "r"(mk_esid_data(VMALLOCBASE, 1)),
+		     :: "r"(mk_vsid_data(VMALLOC_OFFSET, SLB_VSID_KERNEL)),
+		        "r"(mk_esid_data(VMALLOC_OFFSET, 1)),
 		        "r"(mk_vsid_data(ksp_esid_data, ksp_flags)),
 		        "r"(ksp_esid_data)
 		     : "memory");
@@ -146,7 +146,7 @@ void slb_initialize(void)
  	asm volatile("slbmte  %0,%0"::"r" (0) : "memory");
 	asm volatile("isync; slbia; isync":::"memory");
 	create_slbe(KERNELBASE, flags, 0);
-	create_slbe(VMALLOCBASE, SLB_VSID_KERNEL, 1);
+	create_slbe(VMALLOC_OFFSET, SLB_VSID_KERNEL, 1);
 	/* We don't bolt the stack for the time being - we're in boot,
 	 * so the stack is in the bolted segment.  By the time it goes
 	 * elsewhere, we'll call _switch() which will bolt in the new
Index: work/include/asm-ppc64/page.h
===================================================================
--- work.orig/include/asm-ppc64/page.h
+++ work/include/asm-ppc64/page.h
@@ -213,9 +213,9 @@ extern u64 ppc64_pft_size;		/* Log 2 of 
 /*             to change!                               */
 #define PAGE_OFFSET     ASM_CONST(0xC000000000000000)
 #define KERNELBASE      PAGE_OFFSET
-#define VMALLOCBASE     ASM_CONST(0xD000000000000000)
+#define VMALLOC_OFFSET		ASM_CONST(0xD000000000000000)
 
-#define VMALLOC_REGION_ID  (VMALLOCBASE >> REGION_SHIFT)
+#define VMALLOC_REGION_ID	(VMALLOC_OFFSET >> REGION_SHIFT)
 #define KERNEL_REGION_ID   (KERNELBASE >> REGION_SHIFT)
 #define USER_REGION_ID     (0UL)
 #define REGION_ID(ea)	   (((unsigned long)(ea)) >> REGION_SHIFT)
Index: work/arch/ppc64/kernel/lparmap.c
===================================================================
--- work.orig/arch/ppc64/kernel/lparmap.c
+++ work/arch/ppc64/kernel/lparmap.c
@@ -18,8 +18,8 @@ const struct LparMap __attribute__((__se
 	.xEsids = {
 		{ .xKernelEsid = GET_ESID(KERNELBASE),
 		  .xKernelVsid = KERNEL_VSID(KERNELBASE), },
-		{ .xKernelEsid = GET_ESID(VMALLOCBASE),
-		  .xKernelVsid = KERNEL_VSID(VMALLOCBASE), },
+		{ .xKernelEsid = GET_ESID(VMALLOC_OFFSET),
+		  .xKernelVsid = KERNEL_VSID(VMALLOC_OFFSET), },
 	},
 
 	.xRanges = {



More information about the Linuxppc64-dev mailing list