linux-yocto/tools/arch
Tiezhu Yang b6f29fa5f6 objtool/LoongArch: Mark special atomic instruction as INSN_BUG type
commit 539d7344d4feaea37e05863e9aa86bd31f28e46f upstream.

When compiling with LLVM and CONFIG_RUST is set, there exists the
following objtool warning:

  rust/compiler_builtins.o: warning: objtool: __rust__unordsf2(): unexpected end of section .text.unlikely.

objdump shows that the end of section .text.unlikely is an atomic
instruction:

  amswap.w        $zero, $ra, $zero

According to the LoongArch Reference Manual, if the amswap.w atomic
memory access instruction has the same register number as rd and rj,
the execution will trigger an Instruction Non-defined Exception, so
mark the above instruction as INSN_BUG type to fix the warning.

Cc: stable@vger.kernel.org
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-25 11:13:45 +02:00
..
alpha/include
arc/include/uapi/asm
arm/include
arm64 tools headers arm64: Sync arm64's cputype.h with the kernel sources 2024-10-28 12:33:50 -03:00
csky/include/uapi/asm
hexagon/include/uapi/asm
loongarch/include objtool/LoongArch: Mark special atomic instruction as INSN_BUG type 2025-09-25 11:13:45 +02:00
microblaze/include/uapi/asm
mips/include
parisc/include/uapi/asm
powerpc/include selftests: vDSO: unconditionally build chacha test 2024-10-08 15:21:29 -06:00
riscv/include tools: Add riscv barrier implementation 2024-09-20 01:46:46 -07:00
s390/include selftests: vDSO: unconditionally build chacha test 2024-10-08 15:21:29 -06:00
sh/include
sparc/include
x86 x86/rdrand: Disable RDSEED on AMD Cyan Skillfish 2025-07-17 18:37:14 +02:00
xtensa/include