sched/headers: Move kstack_end() from <linux/sched.h> to <linux/sched/task_stack.h>
authorIngo Molnar <mingo@kernel.org>
Sun, 5 Feb 2017 13:31:22 +0000 (14:31 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 3 Mar 2017 00:45:24 +0000 (01:45 +0100)
This is a task-stack related API, not core scheduler functionality.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h
include/linux/sched/task_stack.h

index 5f2267e41fdecc75b40cebb77dce88948a53f300..309eb76b7eab189a8ba8e88a9a3273b51a663032 100644 (file)
@@ -1360,16 +1360,6 @@ static inline struct thread_info *task_thread_info(struct task_struct *task)
 # define task_thread_info(task)        ((struct thread_info *)(task)->stack)
 #endif
 
-#ifndef __HAVE_ARCH_KSTACK_END
-static inline int kstack_end(void *addr)
-{
-       /* Reliable end of stack detection:
-        * Some APM bios versions misalign the stack
-        */
-       return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*)));
-}
-#endif
-
 extern struct pid_namespace init_pid_ns;
 
 /*
index aaa5c2a6a0e9bdc7a7a4b88756456a13e73c3e24..df6ea6665b310ec4443d883487e7bb1613041f0d 100644 (file)
@@ -108,4 +108,14 @@ static inline unsigned long stack_not_used(struct task_struct *p)
 #endif
 extern void set_task_stack_end_magic(struct task_struct *tsk);
 
+#ifndef __HAVE_ARCH_KSTACK_END
+static inline int kstack_end(void *addr)
+{
+       /* Reliable end of stack detection:
+        * Some APM bios versions misalign the stack
+        */
+       return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*)));
+}
+#endif
+
 #endif /* _LINUX_SCHED_TASK_STACK_H */