arc: remove #ifndef CONFIG_AS_CFI_SIGNAL_FRAME
PATCH 1/1 arc: remove #ifndef CONFIG_AS_CFI_SIGNAL_FRAME
CONFIG_AS_CFI_SIGNAL_FRAME is never defined for ARC.
---
arch/arc/kernel/unwind.c | 2 -- 1 file changed, 2 deletions(-)
arch/arc/kernel/unwind.c +0 -2
@@ -1178,11 +1178,9 @@ int arc_unwind(struct unwind_frame_info *frame)#endif /* update frame */ -#ifndef CONFIG_AS_CFI_SIGNAL_FRAME if (frame->call_frame && !UNW_DEFAULT_RA (state.regs[retAddrReg], state.dataAlign)) frame->call_frame =0 ; -#endif cfa = FRAME_REG(state.cfa.reg, unsigned long) + state.cfa.offs; startLoc = min_t(unsigned long, UNW_SP(frame), cfa); endLoc = max_t(unsigned long, UNW_SP(frame), cfa);
Signature · 7 lines
2.25.1 _______________________________________________ linux-snps-arc mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Quoted 3 lines · Masahiro Yamada
CONFIG_AS_CFI_SIGNAL_FRAMEis never defined for ARC.Suggested-by Nick Desaulniers <[email protected]>
Where, how ?
Quoted 12 lines
Signed-off-by Masahiro Yamada <[email protected]>---
arch/arc/kernel/unwind.c | 2 -- 1 file changed, 2 deletions(-)arch/arc/kernel/unwind.c +0
-0@@ -1178,11 +1178,9 @@ int arc_unwind(struct unwind_frame_info *frame)#endif
arch/arc/kernel/unwind.c int arc_unwind(struct unwind_frame_info *frame) · line 1186
Quoted 10 lines
arch/arc/kernel/unwind.c +0
-2/* update frame */ -#ifndef CONFIG_AS_CFI_SIGNAL_FRAME if (frame->call_frame && !UNW_DEFAULT_RA (state.regs[retAddrReg], state.dataAlign)) frame->call_frame =0 ; -#endif cfa = FRAME_REG(state.cfa.reg, unsigned long) + state.cfa.offs; startLoc = min_t(unsigned long, UNW_SP(frame), cfa); endLoc = max_t(unsigned long, UNW_SP(frame), cfa);
Actually there's more scope for cleanup here. The while signal frame stuff is not relevant here at all as this is only kernel stack frames. So all of frame->call_frame stuff is bogus at best.
I once had an branch with ~15 patches to clean this all up. Let me go find it.
Curious though about the CC list, is this patch part of a bigger series or some such. So many people from all over suddenly interested in ARC ;-)
-Vineet
Quoted 7 lines · Vineet Gupta
Quoted 3 lines · Masahiro Yamada
CONFIG_AS_CFI_SIGNAL_FRAMEis never defined for ARC.Suggested-by Nick Desaulniers <[email protected]>Where, how ?
I was working on various cleanups of x86 CONFIG_AS_* macros.
https://lore.kernel.org/patchwork/patch/1214512/
I removed CONFIG_AS_CFI_SIGNAL_FRAME from x86.
Nick pointed out the same name macro used in ARC, which is not defined anywhere.
Quoted 27 lines
Quoted 12 lines
Signed-off-by Masahiro Yamada <[email protected]>---
arch/arc/kernel/unwind.c | 2 -- 1 file changed, 2 deletions(-)arch/arc/kernel/unwind.c +0
-0@@ -1178,11 +1178,9 @@ int arc_unwind(struct unwind_frame_info *frame)#endif arch/arc/kernel/unwind.c int arc_unwind(struct unwind_frame_info *frame) · line 1186
Quoted 10 lines
arch/arc/kernel/unwind.c +0
-2/* update frame */ -#ifndef CONFIG_AS_CFI_SIGNAL_FRAME if (frame->call_frame && !UNW_DEFAULT_RA (state.regs[retAddrReg], state.dataAlign)) frame->call_frame =0 ; -#endif cfa = FRAME_REG(state.cfa.reg, unsigned long) + state.cfa.offs; startLoc = min_t(unsigned long, UNW_SP(frame), cfa); endLoc = max_t(unsigned long, UNW_SP(frame), cfa);Actually there's more scope for cleanup here. The while signal frame stuff is not relevant here at all as this is only kernel stack frames. So all of
frame->call_framestuff is bogus at best.
Quoted 1 line
I once had an branch with ~15 patches to clean this all up. Let me go find it.
I am not familiar with ARC code.
So, I leave this up to you for further cleanups.
Quoted 3 lines
Curious though about the CC list, is this patch part of a bigger series or some such. So many people from all over suddenly interested in ARC ;-)
Presumably, they touched this file in the past, and scripts/get_maintainers.pl picked them up.
masahiro@oscar:~/ref/linux$ scripts/get_maintainer.pl -f arch/arc/kernel/unwind.c Vineet Gupta <[email protected]> (supporter:SYNOPSYS ARC ARCHITECTURE,commit_signer:2/5=40%) Kees Cook <[email protected]> (commit_signer:2/5=40%) "Gustavo A. R. Silva" <[email protected]> (commit_signer:2/5=40%,authored:2/5=40%,added_lines:3/11=27%,removed_lines:2/14=14%) Enrico Weigelt <[email protected]> (commit_signer:1/5=20%) Greg Kroah-Hartman <[email protected]> (commit_signer:1/5=20%) Thomas Gleixner <[email protected]> (authored:1/5=20%,added_lines:1/11=9%,removed_lines:4/14=29%) Pankaj Bharadiya <[email protected]> (authored:1/5=20%,added_lines:3/11=27%,removed_lines:3/14=21%) Arnd Bergmann <[email protected]> (authored:1/5=20%,added_lines:4/11=36%,removed_lines:5/14=36%) [email protected] (open list:SYNOPSYS ARC ARCHITECTURE) [email protected] (open list)
Quoted 1 line
-Vineet
Signature · 7 lines
Best Regards Masahiro Yamada _______________________________________________ linux-snps-arc mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Quoted 5 lines · Masahiro Yamada
CONFIG_AS_CFI_SIGNAL_FRAMEis never defined for ARC.Suggested-by Nick Desaulniers <[email protected]>Signed-off-by Masahiro Yamada <[email protected]>
Thanks for the patch. I worry there may be many preprocessor checks in the kernel that are always true/false.
Quoted 24 lines
---
arch/arc/kernel/unwind.c | 2 -- 1 file changed, 2 deletions(-)arch/arc/kernel/unwind.c +0
-3@@ -1178,11 +1178,9 @@ int arc_unwind(struct unwind_frame_info *frame)#endif /* update frame */ -#ifndef CONFIG_AS_CFI_SIGNAL_FRAME if (frame->call_frame && !UNW_DEFAULT_RA (state.regs[retAddrReg], state.dataAlign)) frame->call_frame =0 ; -#endif cfa = FRAME_REG(state.cfa.reg, unsigned long) + state.cfa.offs; startLoc = min_t(unsigned long, UNW_SP(frame), cfa); endLoc = max_t(unsigned long, UNW_SP(frame), cfa); --2.25.1
Signature · 2 lines
Thanks, ~Nick Desaulniers