Re: arch/mips/include/asm/bitops.h:104:2: warning: used $at (currently $1) without ".set noat"
From: Maciej W. Rozycki
Date: Thu Feb 19 2026 - 19:33:15 EST
On Thu, 19 Feb 2026, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 956b9cbd7f156c8672dac94a00de3c6a0939c692
> commit: 511b3b644e28d9b66e32515a74c57ff599e89035 nvmet: pci-epf: move DMA initialization to EPC init callback
> date: 3 months ago
> config: mips-randconfig-r111-20260219 (https://download.01.org/0day-ci/archive/20260219/202602191524.ahByivoK-lkp@xxxxxxxxx/config)
> compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e86750b29fa0ff207cd43213d66dabe565417638)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260219/202602191524.ahByivoK-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202602191524.ahByivoK-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
> In file included from drivers/nvme/target/pci-epf.c:11:
> In file included from include/linux/delay.h:12:
> In file included from include/linux/math.h:6:
> In file included from arch/mips/include/asm/div64.h:89:
> In file included from include/asm-generic/div64.h:55:
> In file included from include/linux/log2.h:12:
> In file included from include/linux/bitops.h:67:
> >> arch/mips/include/asm/bitops.h:104:2: warning: used $at (currently $1) without ".set noat" [-Winline-asm]
> 104 | __bit_op(*m, "or\t%0, %2", "ir"(BIT(bit)));
> | ^
> arch/mips/include/asm/bitops.h:33:3: note: expanded from macro '__bit_op'
> 33 | "1: " __stringify(LONG_LL) " %0, %1 \n" \
> | ^
> <inline asm>:4:13: note: instantiated into assembly here
> 4 | 1: ll $3, 0($1)
> | ^
FWIW, it seems to me like a compiler bug hitting the commit by chance.
The issue is $1 must not be supplied as a register operand to inline asm,
as MIPS inline asm is in the `noat' assembly mode by default (as correctly
reported here) and code authors are not supposed to switch the mode only
to make compiler output work and may assume $1 is available for use by
macro expansions. Either the register allocator has to avoid choosing $1
for expressions that are used with inline asm or the register has to be
excluded from allocation altogether, such as with GCC where it's a fixed
register.
Maciej