[PATCH -next] arm64: add missing header dependencies

Gaosheng Cui cuigaosheng1 at huawei.com
Sun May 8 23:17:51 PDT 2022


We get one error when building module with processor.h:

./arch/arm64/include/asm/processor.h:263:36: error: implicit declaration of function ‘task_stack_page’;
  ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
./arch/arm64/include/asm/processor.h:266:42: note: in expansion of macro ‘task_pt_regs’
 #define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk))

task_stack_page is declared in linux/sched/task_stack.h, so this patch
add the missing header dependencies.

Signed-off-by: Gaosheng Cui <cuigaosheng1 at huawei.com>
---
 arch/arm64/include/asm/processor.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index 73e38d9a540c..1c239841c4d6 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -28,6 +28,7 @@
 #include <linux/build_bug.h>
 #include <linux/cache.h>
 #include <linux/init.h>
+#include <linux/sched/task_stack.h>
 #include <linux/stddef.h>
 #include <linux/string.h>
 #include <linux/thread_info.h>
-- 
2.25.1




More information about the linux-arm-kernel mailing list