[SPARC64]: Define TASK_SIZE_OF()
[sfrench/cifs-2.6.git] / include / asm-sparc64 / processor.h
index c6896b88283e14415a5b925c566945db7be8179e..885b6a1dcae4d0b75df49cdc82df8e2035aa45a0 100644 (file)
@@ -13,9 +13,7 @@
  */
 #define current_text_addr() ({ void *pc; __asm__("rd %%pc, %0" : "=r" (pc)); pc; })
 
-#include <linux/config.h>
 #include <asm/asi.h>
-#include <asm/a.out.h>
 #include <asm/pstate.h>
 #include <asm/ptrace.h>
 #include <asm/page.h>
 #else
 #define VPTE_SIZE      (1 << (VA_BITS - PAGE_SHIFT + 3))
 #endif
+
 #define TASK_SIZE      ((unsigned long)-VPTE_SIZE)
+#define TASK_SIZE_OF(tsk) \
+       (test_tsk_thread_flag(tsk,TIF_32BIT) ? \
+        (1UL << 32UL) : TASK_SIZE)
+#ifdef __KERNEL__
+
+#define STACK_TOP32    ((1UL << 32UL) - PAGE_SIZE)
+#define STACK_TOP64    (0x0000080000000000UL - (1UL << 32UL))
+
+#define STACK_TOP      (test_thread_flag(TIF_32BIT) ? \
+                        STACK_TOP32 : STACK_TOP64)
+
+#define STACK_TOP_MAX  STACK_TOP64
+
+#endif
 
 #ifndef __ASSEMBLY__