Index: kernel/arch/ia64/include/arch/context.h
===================================================================
--- kernel/arch/ia64/include/arch/context.h	(revision 4177e707b2d3067590985a1aa9576c2426944a8d)
+++ kernel/arch/ia64/include/arch/context.h	(revision 0b0508283ddd2f79e0dcee257b44867abb882bdf)
@@ -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)
 
