intel_intrin.h intrinsics.h perfmon_default_smpl.h     \
         ptrace_offsets.h rse.h setup.h ucontext.h
 
-unifdef-y += perfmon.h
+unifdef-y += perfmon.h ustack.h
 
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
+# ifdef __KERNEL__
 
 #include <asm/intrinsics.h>
 #include <asm/types.h>
 # define __pa(x)               ((x) - PAGE_OFFSET)
 # define __va(x)               ((x) + PAGE_OFFSET)
 #else /* !__ASSEMBLY */
-# ifdef __KERNEL__
 #  define STRICT_MM_TYPECHECKS
 
 extern void clear_page (void *page);
        return order;
 }
 
-# endif /* __KERNEL__ */
 #endif /* !__ASSEMBLY__ */
 
 #ifdef STRICT_MM_TYPECHECKS
                                         (((current->personality & READ_IMPLIES_EXEC) != 0)     \
                                          ? VM_EXEC : 0))
 
+# endif /* __KERNEL__ */
 #endif /* _ASM_IA64_PAGE_H */
 
 
 
 #include <asm/fpu.h>
+
+#ifdef __KERNEL__
 #ifndef ASM_OFFSETS_C
 #include <asm/asm-offsets.h>
 #endif
 
 #define KERNEL_STACK_SIZE              IA64_STK_OFFSET
 
-#ifndef __ASSEMBLY__
+#endif /* __KERNEL__ */
 
-#include <asm/current.h>
-#include <asm/page.h>
+#ifndef __ASSEMBLY__
 
 /*
  * This struct defines the way the registers are saved on system
 
 #ifdef __KERNEL__
 
+#include <asm/current.h>
+#include <asm/page.h>
+
 #define __ARCH_SYS_PTRACE      1
 
 /*
 
  * Constants for the user stack size
  */
 
+#ifdef __KERNEL__
 #include <asm/page.h>
 
 /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */
 #define MAX_USER_STACK_SIZE    (RGN_MAP_LIMIT/2)
-/* Make a default stack size of 2GB */
-#define DEFAULT_USER_STACK_SIZE        (1UL << 31)
 #define STACK_TOP              (0x6000000000000000UL + RGN_MAP_LIMIT)
+#endif
+
+/* Make a default stack size of 2GiB */
+#define DEFAULT_USER_STACK_SIZE        (1UL << 31)
 
 #endif /* _ASM_IA64_USTACK_H */