Re: [PATCH] arm64: Use symbolic constants for the ccmp NZCV immediates

From: Catalin Marinas

Date: Tue Nov 24 2026 - 06:33:04 EST


On Fri, Oct 09, 2026 at 08:21:47AM +0100, Fuad Tabba wrote:
> diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
> index f7dc5fb9427d6..15c381ef7d2c2 100644
> --- a/arch/arm64/include/asm/ptrace.h
> +++ b/arch/arm64/include/asm/ptrace.h
> @@ -30,6 +30,10 @@
> #define PSR_MODE_THREAD_BIT (1 << 0)
> #define PSR_IL_BIT (1 << 20)
>
> +/* CCMP NZCV immediates that make the named condition hold */
> +#define CCMP_NZCV_EQ (PSR_Z_BIT >> 28)
> +#define CCMP_NZCV_LT (PSR_N_BIT >> 28)
> +
> /* AArch32-specific ptrace requests */
> #define COMPAT_PTRACE_GETREGS 12
> #define COMPAT_PTRACE_SETREGS 13

One nit: I'd place the definitions above (or below) the
ARM64_S390_COMMON block, the generated s390 header shouldn't need them.
Otherwise it greatly improves clarity.

Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>