[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241126152207.GR38972@noisy.programming.kicks-ass.net>
Date: Tue, 26 Nov 2024 16:22:07 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 02/10] objtool: Handle special cases of dead end insn
> I was poking at the reachable annotations and ended up with this:
Also see here:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=objtool/core
Once the robots agree it all compiles, I'll post.
> --- a/arch/loongarch/include/asm/bug.h
> +++ b/arch/loongarch/include/asm/bug.h
> @@ -4,6 +4,7 @@
>
> #include <asm/break.h>
> #include <linux/stringify.h>
> +#include <linux/objtool.h>
>
> #ifndef CONFIG_DEBUG_BUGVERBOSE
> #define _BUGVERBOSE_LOCATION(file, line)
> @@ -37,21 +38,21 @@
>
> #define ASM_BUG() ASM_BUG_FLAGS(0)
>
> -#define __BUG_FLAGS(flags) \
> - asm_inline volatile (__stringify(ASM_BUG_FLAGS(flags)));
> +#define __BUG_FLAGS(flags, extra) \
> + asm_inline volatile (__stringify(ASM_BUG_FLAGS(flags)) \
> + extra);
>
> #define __WARN_FLAGS(flags) \
> do { \
> instrumentation_begin(); \
> - __BUG_FLAGS(BUGFLAG_WARNING|(flags)); \
> - annotate_reachable(); \
> + __BUG_FLAGS(BUGFLAG_WARNING|(flags), ASM_REACHABLE); \
> instrumentation_end(); \
> } while (0)
>
> #define BUG() \
> do { \
> instrumentation_begin(); \
> - __BUG_FLAGS(0); \
> + __BUG_FLAGS(0, ""); \
> unreachable(); \
> } while (0)
>
Powered by blists - more mailing lists