Index: kernel/arch/ia64/include/arch/context.h
===================================================================
--- kernel/arch/ia64/include/arch/context.h	(revision 7c3fb9bd77e4d2f6c10517a052e567f176fa91ee)
+++ kernel/arch/ia64/include/arch/context.h	(revision 9d8307a94aa6d903e4fcaa8ae5c22e2fa48fddfb)
@@ -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)
 
