Skip to content

Commit

Permalink
Fix build due to 5e9f0c4819deb9459f32f12c4fd2b47993b8c395
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-mnemonic committed Nov 20, 2024
1 parent 4a575e0 commit eea17fd
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 7d0d98f58faf3a843780a50414ba495eecb26ce9 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Wed, 20 Nov 2024 11:15:14 +0100
Subject: [PATCH] Revert "sched: remove unused __HAVE_THREAD_FUNCTIONS hook
support"

This reverts commit 5e9f0c4819deb9459f32f12c4fd2b47993b8c395.
---
include/linux/sched.h | 2 +-
include/linux/sched/task_stack.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index ae39af43290c..85edf067a961 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1900,7 +1900,7 @@ extern unsigned long init_stack[THREAD_SIZE / sizeof(unsigned long)];

#ifdef CONFIG_THREAD_INFO_IN_TASK
# define task_thread_info(task) (&(task)->thread_info)
-#else
+#elif !defined(__HAVE_THREAD_FUNCTIONS)
# define task_thread_info(task) ((struct thread_info *)(task)->stack)
#endif

diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h
index cffad65bdc6a..6c2fef89a4fd 100644
--- a/include/linux/sched/task_stack.h
+++ b/include/linux/sched/task_stack.h
@@ -34,7 +34,7 @@ static __always_inline unsigned long *end_of_stack(const struct task_struct *tas
#endif
}

-#else
+#elif !defined(__HAVE_THREAD_FUNCTIONS)

#define task_stack_page(task) ((void *)(task)->stack)

--
2.25.1

0 comments on commit eea17fd

Please sign in to comment.