Skip to contentSkip to conversation

x86/ftrace: Include <asm/ptrace.h>

PATCH In review Sami Tolvanen 2 participants 2 messages Sep 16, 2024 – Sep 17, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/ftrace: Include <asm/ptrace.h>

<asm/ftrace.h> uses struct pt_regs in several places. Include <asm/ptrace.h> to ensure it's visible. This is needed to make sure object files that only include <asm/asm-prototypes.h> compile.

---
 arch/x86/include/asm/ftrace.h | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/ftrace.h +2 -0
index 0152a81d9b4a..b4d719de2c84 100644
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_FTRACE_H
 #define _ASM_X86_FTRACE_H
 
+#include <asm/ptrace.h>
+
 #ifdef CONFIG_FUNCTION_TRACER
 #ifndef CC_USING_FENTRY
 # error Compiler does not support fentry?

base-commit: ad060dbbcfcfcba624ef1a75e1d71365a98b86d8

Signature · 1 line
2.46.0.662.g92d0881bb0-goog
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · On Mon, 16 Sep 2024 22:15:57 +0000 Sami Tolvanen <[email protected]>…

<asm/ftrace.h> uses struct pt_regs in several places. Include <asm/ptrace.h> to ensure it's visible. This is needed to make sure object files that only include <asm/asm-prototypes.h> compile.

Looks good to me.

Thanks!

Quoted 25 lines
---
 arch/x86/include/asm/ftrace.h | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/ftrace.h +2 -0
index 0152a81d9b4a..b4d719de2c84 100644
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_FTRACE_H
 #define _ASM_X86_FTRACE_H
 
+#include <asm/ptrace.h>
+
 #ifdef CONFIG_FUNCTION_TRACER
 #ifndef CC_USING_FENTRY
 # error Compiler does not support fentry?

base-commit: ad060dbbcfcfcba624ef1a75e1d71365a98b86d8

Signature · 1 line
2.46.0.662.g92d0881bb0-goog
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>