diff --git a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c
index a3c10a961938548a2b3d82e217c3933500fe21bc..d1ec07227ff24f6c52a0f2af710d6f25c6cbaab7 100644
--- a/arch/ppc64/kernel/irq.c
+++ b/arch/ppc64/kernel/irq.c
@@ -579,7 +579,7 @@ int do_IRQ(struct pt_regs *regs)
 	{
 		long sp;
 
-		sp = (unsigned long)_get_SP() & (THREAD_SIZE-1);
+		sp = __get_SP() & (THREAD_SIZE-1);
 
 		if (unlikely(sp < (sizeof(struct thread_info) + 8192))) {
 			printk("do_IRQ: stack overflow: %ld\n",
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
index 1777f8b88805ffa35d45f1aa22cb1899953fc2ae..9778a807723de9f50c5f07430c73fa2970bb9ba1 100644
--- a/arch/ppc64/kernel/misc.S
+++ b/arch/ppc64/kernel/misc.S
@@ -383,10 +383,6 @@ _GLOBAL(abs)
 	neg	r3,r3
 10:	blr
 
-_GLOBAL(_get_SP)
-	mr	r3,r1		/* Close enough */
-	blr
-	
 _GLOBAL(_get_PVR)
 	mfspr	r3,PVR
 	blr
diff --git a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c
index 435b90a6b78f5f890d6ccbd038eed8f15dd55e4e..8dc09c2903ef43229c97fb5a1ac9fe26a5b5340b 100644
--- a/arch/ppc64/kernel/process.c
+++ b/arch/ppc64/kernel/process.c
@@ -162,7 +162,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
 	 * for that first.
 	 */
 	if ((cur_cpu_spec->cpu_features & CPU_FTR_SLB) &&
-	    GET_ESID((unsigned long)_get_SP()) != GET_ESID(PAGE_OFFSET)) {
+	    GET_ESID(__get_SP()) != GET_ESID(PAGE_OFFSET)) {
 		union {
 			unsigned long word0;
 			slb_dword0 data;
@@ -171,7 +171,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
 		esid_data.word0 = 0;
 		/* class bit is in valid field for slbie instruction */
 		esid_data.data.v = 1;
-		esid_data.data.esid = GET_ESID((unsigned long)_get_SP());
+		esid_data.data.esid = GET_ESID(__get_SP());
 		asm volatile("isync; slbie %0; isync" : : "r" (esid_data));
 	}
 	local_irq_restore(flags);
@@ -528,7 +528,7 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
 		if (p) {
 			sp = p->thread.ksp;
 		} else {
-			sp = (unsigned long)_get_SP();
+			sp = __get_SP();
 			p = current;
 		}
 	}
@@ -549,7 +549,7 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
 
 void dump_stack(void)
 {
-	show_stack(current, (unsigned long *)_get_SP());
+	show_stack(current, (unsigned long *)__get_SP());
 }
 
 EXPORT_SYMBOL(dump_stack);
diff --git a/arch/ppc64/kernel/stab.c b/arch/ppc64/kernel/stab.c
index b17b7fc9a9b57767a39ce1450efddd217a6120a9..6deb54d6e6a4441867f100f600a4403c8a9cd23a 100644
--- a/arch/ppc64/kernel/stab.c
+++ b/arch/ppc64/kernel/stab.c
@@ -324,7 +324,7 @@ static void make_slbe(unsigned long esid, unsigned long vsid, int large,
 			castout_entry = 1; 
 		asm volatile("slbmfee  %0,%1" : "=r" (esid_data) : "r" (entry));
 	} while (esid_data.data.v &&
-		 esid_data.data.esid == GET_ESID((unsigned long)_get_SP()));
+		 esid_data.data.esid == GET_ESID(__get_SP()));
 
 	get_paca()->xStab_data.next_round_robin = castout_entry;
 
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h
index 1bde268f4d854536a5b672046ad7aad682b35eb6..b8c7d26b947b8d2e2035a431f7f96b4eb28fb0d3 100644
--- a/include/asm-ppc64/processor.h
+++ b/include/asm-ppc64/processor.h
@@ -475,7 +475,8 @@ static inline void set_tb(unsigned int upper, unsigned int lower)
 	mttbl(lower);
 }
 
-extern unsigned long *_get_SP(void);
+#define __get_SP()	({unsigned long sp; \
+			asm volatile("mr %0,1": "=r" (sp)); sp;})
 
 extern int have_of;