[PATCH 08/10] arm64: Move esr_comment() to <asm/esr.h>
Marc Zyngier
maz at kernel.org
Sun Mar 17 05:50:37 PDT 2024
On Thu, 14 Mar 2024 20:25:29 +0000,
Pierre-Clément Tosi <ptosi at google.com> 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 at google.com>
> ---
> 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.
More information about the linux-arm-kernel
mailing list