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 58093d99e8de3e461cadfcbc02a56288a1c5a2d6)
@@ -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)
 
