linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 2654/3060] arch/arm/include/asm/cmpxchg.h:167:12: error: call to undeclared function 'cmpxchg_emu_u8'; ISO C99 and later do not support implicit function declarations
Date: Sun, 2 Jun 2024 12:56:31 +0800	[thread overview]
Message-ID: <202406021249.imvU1Clu-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0e1980c40b6edfa68b6acf926bab22448a6e40c9
commit: 6ba3d5014d24a46ed329fc567e554c218eb62cfa [2654/3060] ARM: Emulate one-byte cmpxchg
config: arm-randconfig-r051-20240602 (https://download.01.org/0day-ci/archive/20240602/202406021249.imvU1Clu-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project bafda89a0944d947fc4b3b5663185e07a397ac30)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240602/202406021249.imvU1Clu-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406021249.imvU1Clu-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/bounds.c:13:
   In file included from include/linux/log2.h:12:
   In file included from include/linux/bitops.h:63:
   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:167:12: error: call to undeclared function 'cmpxchg_emu_u8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     167 |                 oldval = cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
         |                          ^
   1 error generated.
   make[3]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1208: prepare0] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:240: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:240: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/cmpxchg_emu_u8 +167 arch/arm/include/asm/cmpxchg.h

   152	
   153	/*
   154	 * cmpxchg only support 32-bits operands on ARMv6.
   155	 */
   156	
   157	static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
   158					      unsigned long new, int size)
   159	{
   160		unsigned long oldval, res;
   161	
   162		prefetchw((const void *)ptr);
   163	
   164		switch (size) {
   165	#ifdef CONFIG_CPU_V6	/* min ARCH >= ARMv6K */
   166		case 1:
 > 167			oldval = cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
   168			break;
   169	#else
   170		case 1:
   171			do {
   172				asm volatile("@ __cmpxchg1\n"
   173				"	ldrexb	%1, [%2]\n"
   174				"	mov	%0, #0\n"
   175				"	teq	%1, %3\n"
   176				"	strexbeq %0, %4, [%2]\n"
   177					: "=&r" (res), "=&r" (oldval)
   178					: "r" (ptr), "Ir" (old), "r" (new)
   179					: "memory", "cc");
   180			} while (res);
   181			break;
   182		case 2:
   183			do {
   184				asm volatile("@ __cmpxchg1\n"
   185				"	ldrexh	%1, [%2]\n"
   186				"	mov	%0, #0\n"
   187				"	teq	%1, %3\n"
   188				"	strexheq %0, %4, [%2]\n"
   189					: "=&r" (res), "=&r" (oldval)
   190					: "r" (ptr), "Ir" (old), "r" (new)
   191					: "memory", "cc");
   192			} while (res);
   193			break;
   194	#endif
   195		case 4:
   196			do {
   197				asm volatile("@ __cmpxchg4\n"
   198				"	ldrex	%1, [%2]\n"
   199				"	mov	%0, #0\n"
   200				"	teq	%1, %3\n"
   201				"	strexeq %0, %4, [%2]\n"
   202					: "=&r" (res), "=&r" (oldval)
   203					: "r" (ptr), "Ir" (old), "r" (new)
   204					: "memory", "cc");
   205			} while (res);
   206			break;
   207		default:
   208			__bad_cmpxchg(ptr, size);
   209			oldval = 0;
   210		}
   211	
   212		return oldval;
   213	}
   214	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


             reply	other threads:[~2024-06-02  4:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02  4:56 kernel test robot [this message]
2024-06-02 16:58 ` Paul E. McKenney

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=202406021249.imvU1Clu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paulmck@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox