Re: [PATCH v4 07/14] arm64: Add support for suppressing warning backtraces
From: Will Deacon
Date: Thu Mar 13 2025 - 08:25:42 EST
On Thu, Mar 13, 2025 at 11:43:22AM +0000, Alessandro Carminati wrote:
> diff --git a/arch/arm64/include/asm/bug.h b/arch/arm64/include/asm/bug.h
> index 28be048db3f6..044c5e24a17d 100644
> --- a/arch/arm64/include/asm/bug.h
> +++ b/arch/arm64/include/asm/bug.h
> @@ -11,8 +11,14 @@
>
> #include <asm/asm-bug.h>
>
> +#ifdef HAVE_BUG_FUNCTION
> +# define __BUG_FUNC __func__
> +#else
> +# define __BUG_FUNC NULL
> +#endif
> +
> #define __BUG_FLAGS(flags) \
> - asm volatile (__stringify(ASM_BUG_FLAGS(flags)));
> + asm volatile (__stringify(ASM_BUG_FLAGS(flags, %c0)) : : "i" (__BUG_FUNC));
Why is 'i' the right asm constraint to use here? It seems a bit odd to
use that for a pointer.
Will