From 4b73556a8964836959a1bdeac816619eb428fdcc Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Wed, 5 Jun 2019 22:32:21 +0200 Subject: [PATCH] compiler.h: add CC_USING_PATCHABLE_FUNCTION_ENTRY commit 2809b392a62ae307da058a52d451b2fc3ce4de7e upstream. This can be used for architectures implementing dynamic ftrace via -fpatchable-function-entry. Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller Signed-off-by: Zou Cao Acked-by: Baoyou Xie --- include/linux/compiler_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 2b8ed70c4c77..61e3212457db 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -230,6 +230,8 @@ struct ftrace_likely_data { #if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__) #define notrace __attribute__((hotpatch(0, 0))) +#elif defined(CC_USING_PATCHABLE_FUNCTION_ENTRY) +#define notrace __attribute__((patchable_function_entry(0, 0))) #else #define notrace __attribute__((no_instrument_function)) #endif -- GitLab