mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] objtool: replace _ASM_PTR with quad in macros
@ 2022-08-23 13:31 Chen Zhongjin
  2022-08-23 16:47 ` Christophe Leroy
  2022-08-24  2:48 ` Chen Zhongjin
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Zhongjin @ 2022-08-23 13:31 UTC (permalink / raw)
  To: linux-kernel, linuxppc-dev
  Cc: jpoimboe, peterz, bp, mhiramat, sv, christophe.leroy,
	naveen.n.rao, chenzhongjin

Macros STACK_FRAME_NON_STANDARD and ANNOTATE_NOENDBR uses
_ASM_PTR. It switch between .long and .quad based on 32bit
or 64bit. However objtool doesn't work for 32bit, so _ASM_PTR
makes no sense.

Considering that _ASM_PTR comes from asm.h, which is x86
specific head file, while objtool.h is generic. Replace
_ASM_PTR with quad and remove asm.h reference.

Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
---
 include/linux/objtool.h       | 6 ++----
 tools/include/linux/objtool.h | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/include/linux/objtool.h b/include/linux/objtool.h
index 62c54ffbeeaa..d2413cb78037 100644
--- a/include/linux/objtool.h
+++ b/include/linux/objtool.h
@@ -45,8 +45,6 @@ struct unwind_hint {
 
 #ifdef CONFIG_OBJTOOL
 
-#include <asm/asm.h>
-
 #ifndef __ASSEMBLY__
 
 #define UNWIND_HINT(sp_reg, sp_offset, type, end)		\
@@ -87,7 +85,7 @@ struct unwind_hint {
 #define ANNOTATE_NOENDBR					\
 	"986: \n\t"						\
 	".pushsection .discard.noendbr\n\t"			\
-	_ASM_PTR " 986b\n\t"					\
+	".quad 986b\n\t"					\
 	".popsection\n\t"
 
 #define ASM_REACHABLE							\
@@ -144,7 +142,7 @@ struct unwind_hint {
 
 .macro STACK_FRAME_NON_STANDARD func:req
 	.pushsection .discard.func_stack_frame_non_standard, "aw"
-	_ASM_PTR \func
+	.quad \func
 	.popsection
 .endm
 
diff --git a/tools/include/linux/objtool.h b/tools/include/linux/objtool.h
index 62c54ffbeeaa..d2413cb78037 100644
--- a/tools/include/linux/objtool.h
+++ b/tools/include/linux/objtool.h
@@ -45,8 +45,6 @@ struct unwind_hint {
 
 #ifdef CONFIG_OBJTOOL
 
-#include <asm/asm.h>
-
 #ifndef __ASSEMBLY__
 
 #define UNWIND_HINT(sp_reg, sp_offset, type, end)		\
@@ -87,7 +85,7 @@ struct unwind_hint {
 #define ANNOTATE_NOENDBR					\
 	"986: \n\t"						\
 	".pushsection .discard.noendbr\n\t"			\
-	_ASM_PTR " 986b\n\t"					\
+	".quad 986b\n\t"					\
 	".popsection\n\t"
 
 #define ASM_REACHABLE							\
@@ -144,7 +142,7 @@ struct unwind_hint {
 
 .macro STACK_FRAME_NON_STANDARD func:req
 	.pushsection .discard.func_stack_frame_non_standard, "aw"
-	_ASM_PTR \func
+	.quad \func
 	.popsection
 .endm
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-24  2:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 13:31 [PATCH] objtool: replace _ASM_PTR with quad in macros Chen Zhongjin
2022-08-23 16:47 ` Christophe Leroy
2022-08-24  2:06   ` Chen Zhongjin
2022-08-24  2:48 ` Chen Zhongjin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®