Index: kernel/arch/ia64/include/arch/context.h
===================================================================
--- kernel/arch/ia64/include/arch/context.h	(revision ed88c8e9e48e792fdd0df46568e33e36eb624db3)
+++ kernel/arch/ia64/include/arch/context.h	(revision 9bde0d5d49e92705a496ff7207d8be4268690bb1)
@@ -50,4 +50,5 @@
 #define SP_DELTA  (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
 
+extern void *__gp;
 /* RSE stack starts at the bottom of memory stack, hence the division by 2. */
 #define context_set(c, _pc, stack, size) \
@@ -57,4 +58,5 @@
 		(c)->ar_pfs &= PFM_MASK; \
 		(c)->sp = ((uintptr_t) stack) + ALIGN_UP((size / 2), STACK_ALIGNMENT) - SP_DELTA; \
+		(c)->r1 = (uintptr_t) &__gp; \
 	} while (0)
 
