All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Boqun Feng <boqun.feng@gmail.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [peterz-queue:core/wip-u128 14/14] arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
Date: Tue, 27 Dec 2022 11:07:30 -0700	[thread overview]
Message-ID: <Y6s0Yongvkn1WoIK@dev-arch.thelio-3990X> (raw)
In-Reply-To: <202212272348.xvp2fQTy-lkp@intel.com>

On Tue, Dec 27, 2022 at 11:27:57PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git core/wip-u128
> head:   c05419246aa69cd3ff3f929e232ebed1b5b49c2d
> commit: c05419246aa69cd3ff3f929e232ebed1b5b49c2d [14/14] atomic: Add test cases for cmpxchg128 family
> config: arm-randconfig-r046-20221226
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project f5700e7b69048de958172fb513b336564e7f8709)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         # https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=c05419246aa69cd3ff3f929e232ebed1b5b49c2d
>         git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
>         git fetch --no-tags peterz-queue core/wip-u128
>         git checkout c05419246aa69cd3ff3f929e232ebed1b5b49c2d
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash lib/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r4, r5, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r6, r7, [r0]
>            ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r6, r7, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r4, r5, [r0]
>            ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r6, r7, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r4, r5, [r0]
>            ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r6, r7, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r4, r5, [r0]
>            ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r6, r7, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r4, r5, [r0]
>            ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r6, r7, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r4, r5, [r0]
>            ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r6, r7, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r4, r5, [r0]
>            ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
> >> arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m
>    "1:     ldrexd          %1, %H1, [%3]\n"
>    ^
>    <inline asm>:1:5: note: instantiated into assembly here
>            1:      ldrexd          r6, r7, [r0]
>                    ^
>    In file included from lib/atomic64_test.c:12:
>    In file included from include/linux/kernel.h:22:
>    In file included from include/linux/bitops.h:68:
>    In file included from arch/arm/include/asm/bitops.h:245:
>    In file included from include/asm-generic/bitops/lock.h:5:
>    In file included from include/linux/atomic.h:7:
>    In file included from arch/arm/include/asm/atomic.h:16:
>    arch/arm/include/asm/cmpxchg.h:258:2: error: instruction requires: !armv*m
>    "       strexd          %0, %5, %H5, [%3]\n"
>     ^
>    <inline asm>:5:2: note: instantiated into assembly here
>            strexd          r1, r4, r5, [r0]
>            ^
>    16 errors generated.

GAS's error message is a little more informative as to what is going on.

/tmp/cccn02Dg.s: Assembler messages:
/tmp/cccn02Dg.s:6048: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6052: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6090: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6094: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6133: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6137: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6175: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6179: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6219: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6223: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6263: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6267: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6311: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6315: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6356: Error: selected processor does not support `ldrexd r0,r1,[r3]' in Thumb mode
/tmp/cccn02Dg.s:6360: Error: selected processor does not support `strexd r2,r6,r7,[r3]' in Thumb mode

which leads to looking at the config:

$ rg 'CPU_(V|32)|THUMB2' .config
265:CONFIG_CPU_V7M=y
268:CONFIG_CPU_32v7M=y
273:CONFIG_CPU_V7M_NUM_IRQ=90
311:CONFIG_THUMB2_KERNEL=y

CONFIG_GENERIC_ATOMIC64 is selected for CONFIG_CPU_V7M, presumably to
avoid using these instructions, based on the other CONFIGs in that
select statement in arch/arm/Kconfig? I am not sure how the test needs
to cope with that but hopefully that makes it a little more obvious what
is happening here.

Cheers,
Nathan

      reply	other threads:[~2022-12-27 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 15:27 [peterz-queue:core/wip-u128 14/14] arch/arm/include/asm/cmpxchg.h:254:1: error: instruction requires: !armv*m kernel test robot
2022-12-27 18:07 ` Nathan Chancellor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y6s0Yongvkn1WoIK@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.