On Thu, 14 Mar 2024 20:25:29 +0000, Pierre-Clément Tosi <ptosi@xxxxxxxxxx> wrote: > > As it is already defined twice and is about to be needed for CFI error > detection, move esr_comment() to a header so that it can be reused. > > Signed-off-by: Pierre-Clément Tosi <ptosi@xxxxxxxxxx> > --- > arch/arm64/include/asm/esr.h | 5 +++++ > arch/arm64/kernel/debug-monitors.c | 4 +--- > arch/arm64/kernel/traps.c | 2 -- > arch/arm64/kvm/handle_exit.c | 2 +- > 4 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/arch/arm64/include/asm/esr.h b/arch/arm64/include/asm/esr.h > index 353fe08546cf..b0c23e7d6595 100644 > --- a/arch/arm64/include/asm/esr.h > +++ b/arch/arm64/include/asm/esr.h > @@ -385,6 +385,11 @@ > #ifndef __ASSEMBLY__ > #include <asm/types.h> > > +static inline unsigned long esr_comment(unsigned long esr) > +{ > + return esr & ESR_ELx_BRK64_ISS_COMMENT_MASK; > +} nit: naming it esr_brk_comment() would make it slightly clearer what this helper applies to, now that it is visible out of the limited context of traps.c. Thanks, M. -- Without deviation from the norm, progress is not possible.