OSDN Git Service

arm64: move TASK_* definitions to <asm/processor.h>
[android-x86/kernel.git] / arch / arm64 / include / asm / processor.h
index 29adab8..7dddca2 100644 (file)
 #ifndef __ASM_PROCESSOR_H
 #define __ASM_PROCESSOR_H
 
+#define TASK_SIZE_64           (UL(1) << VA_BITS)
+
+#ifndef __ASSEMBLY__
+
 /*
  * Default implementation of macro that returns current
  * instruction pointer ("program counter").
 #include <asm/ptrace.h>
 #include <asm/types.h>
 
+/*
+ * TASK_SIZE - the maximum size of a user space task.
+ * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area.
+ */
+#ifdef CONFIG_COMPAT
+#define TASK_SIZE_32           UL(0x100000000)
+#define TASK_SIZE              (test_thread_flag(TIF_32BIT) ? \
+                               TASK_SIZE_32 : TASK_SIZE_64)
+#define TASK_SIZE_OF(tsk)      (test_tsk_thread_flag(tsk, TIF_32BIT) ? \
+                               TASK_SIZE_32 : TASK_SIZE_64)
+#else
+#define TASK_SIZE              TASK_SIZE_64
+#endif /* CONFIG_COMPAT */
+
+#define TASK_UNMAPPED_BASE     (PAGE_ALIGN(TASK_SIZE / 4))
+
 #define STACK_TOP_MAX          TASK_SIZE_64
 #ifdef CONFIG_COMPAT
 #define AARCH32_VECTORS_BASE   0xffff0000
@@ -194,4 +214,5 @@ static inline void spin_lock_prefetch(const void *ptr)
 int cpu_enable_pan(void *__unused);
 int cpu_enable_cache_maint_trap(void *__unused);
 
+#endif /* __ASSEMBLY__ */
 #endif /* __ASM_PROCESSOR_H */