Index: arch/ia64/include/asm.h
===================================================================
--- arch/ia64/include/asm.h	(revision b52da8d7b8d152a08bbcc4e21a25383ba0367730)
+++ arch/ia64/include/asm.h	(revision bcdd9aaa2b06e0698f837f3dd463b72dbb23dfb9)
@@ -33,8 +33,17 @@
 #include <config.h>
 
-/* TODO: implement the real stuff */
+/** Return base address of current stack
+ *
+ * Return the base address of the current stack.
+ * The stack is assumed to be STACK_SIZE long.
+ * The stack must start on page boundary.
+ */
 static inline __address get_stack_base(void)
 {
-	return NULL;
+	__u64 v;
+
+	__asm__ volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1)));
+	
+	return v;
 }
 
Index: arch/ia64/include/context.h
===================================================================
--- arch/ia64/include/context.h	(revision b52da8d7b8d152a08bbcc4e21a25383ba0367730)
+++ arch/ia64/include/context.h	(revision bcdd9aaa2b06e0698f837f3dd463b72dbb23dfb9)
@@ -32,9 +32,13 @@
 #include <arch/types.h>
 
+#define STACK_ITEM_SIZE	16
+
 /*
  * context_save() and context_restore() are both leaf procedures.
  * No need to allocate scratch area.
+ *
+ * One item is put onto the stack to support get_stack_base().
  */
-#define SP_DELTA	0
+#define SP_DELTA	(0+STACK_ITEM_SIZE)
 
 #ifdef context_set
