summaryrefslogtreecommitdiff
path: root/include/linux/sched/task_stack.h
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2024-10-04 11:29:21 +0200
committerThomas Hellström <thomas.hellstrom@linux.intel.com>2024-10-04 11:46:30 +0200
commitb88132ceb3faccdd785809df75f9d490ebaab459 (patch)
treeea383d842f8b5fc4f72ca1ebbd6c02a99754071b /include/linux/sched/task_stack.h
parent491418a258322bbd7f045e36884d2849b673f23d (diff)
parent9852d85ec9d492ebef56dc5f229416c925758edc (diff)
Merge drm/drm-next into drm-xe-next
Backmerging to resolve a conflict with core locally. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Diffstat (limited to 'include/linux/sched/task_stack.h')
-rw-r--r--include/linux/sched/task_stack.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h
index ccd72b978e1f..bf10bdb487dd 100644
--- a/include/linux/sched/task_stack.h
+++ b/include/linux/sched/task_stack.h
@@ -95,23 +95,11 @@ static inline int object_is_on_stack(const void *obj)
extern void thread_stack_cache_init(void);
#ifdef CONFIG_DEBUG_STACK_USAGE
+unsigned long stack_not_used(struct task_struct *p);
+#else
static inline unsigned long stack_not_used(struct task_struct *p)
{
- unsigned long *n = end_of_stack(p);
-
- do { /* Skip over canary */
-# ifdef CONFIG_STACK_GROWSUP
- n--;
-# else
- n++;
-# endif
- } while (!*n);
-
-# ifdef CONFIG_STACK_GROWSUP
- return (unsigned long)end_of_stack(p) - (unsigned long)n;
-# else
- return (unsigned long)n - (unsigned long)end_of_stack(p);
-# endif
+ return 0;
}
#endif
extern void set_task_stack_end_magic(struct task_struct *tsk);