From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62D93C6FD1F for ; Tue, 2 Apr 2024 17:26:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ABF736B0088; Tue, 2 Apr 2024 13:26:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A70326B008A; Tue, 2 Apr 2024 13:26:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 936F66B008C; Tue, 2 Apr 2024 13:26:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 719546B0088 for ; Tue, 2 Apr 2024 13:26:31 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 28956A09AA for ; Tue, 2 Apr 2024 17:26:31 +0000 (UTC) X-FDA: 81965270982.30.AD6EB69 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf29.hostedemail.com (Postfix) with ESMTP id C4841120011 for ; Tue, 2 Apr 2024 17:26:28 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="c/7rjMh+"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.hostedemail.com: domain of "SRS0=/0Vc=LH=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=/0Vc=LH=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712078789; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qhqPC60SQuLrpvZ57a9yYsCfTtoZSAFnQxN8yw6mVOg=; b=EvzN2zourUYkjqjEngHGW3MWCW+ozODOh/xqj6/JR20rgVuB5QyAWV9DXVRUry/5r0tI42 1F6Ub5Ggj1MhGOhWvAKhv2/ebzeCfRg3dMzyae4/lnxNFcuPDfnGArdBnpgO+M3K84qABf FkfnlR8hNsBViCBIOIFC/Zz/Yt0AmIs= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="c/7rjMh+"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.hostedemail.com: domain of "SRS0=/0Vc=LH=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=/0Vc=LH=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712078789; a=rsa-sha256; cv=none; b=nld6OOj+qSBuALLzLNJQuyNyl62Ptq5CjrgHdFFqBX650OA0gjpNdoMNuyPR3hLnzi/wBm 9t2UjsFmyT7EixboJqdb3ey0AS9vSu8NIAe8Qs5mlXP9gbYttEq24J1cMDsKe19j1n57gG rSAM+RzFZ/LphrpVzMPOk8G5YFqOX2Q= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id C3DE6CE1B75; Tue, 2 Apr 2024 17:26:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00F0CC433F1; Tue, 2 Apr 2024 17:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712078783; bh=aPduhq46rSPeI7Urc4pNUadY5Sy6NK1y6o6fPQ+040M=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=c/7rjMh+ax7E8QhQZlrvhL9K3R4r7/0HxZs3E4y238kxL5zK9K9LTY6Bq00wUVock k3aQZFs/OfIhMhwwYwo/yhN2UhlJeIvik7CIMOFaGjVAn9L/DCeWLqTsbSRjdyqlvW u1dSBo9NpLaV2jZtytc3hNoMLdpUl1SnvIIRvnYheILbErQJYYCwK3yEuuYTbA7s25 JWX9NBGYTz4i6lcsUpwraiV+jP4i/DmhYGnKnjxsYiDVgsKYa3QZlpBOmpvYdfJ1Jh xanaufVfWMAgKhkXmGSgmYwS9mu+z1z3nBmN/0NzZnSYR7/rcV7WU5AvhBLV1wbqG5 uhCrzjMLjgUaQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 900DDCE0FF2; Tue, 2 Apr 2024 10:26:22 -0700 (PDT) Date: Tue, 2 Apr 2024 10:26:22 -0700 From: "Paul E. McKenney" To: kernel test robot Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [linux-next:master 2555/3220] arch/csky/include/asm/cmpxchg.h:138:25: error: implicit declaration of function 'cmpxchg_emu_u8' Message-ID: Reply-To: paulmck@kernel.org References: <202404022106.mYwpypit-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202404022106.mYwpypit-lkp@intel.com> X-Rspamd-Queue-Id: C4841120011 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: a7p3qaba6rhapr6njuiwr1jnatejopdk X-HE-Tag: 1712078788-864858 X-HE-Meta: U2FsdGVkX1/+cpvd59YKfudkoaSGaf4I+LNhH4pEXCxn7r7TTx+2dJs8o246BtnWfcBI5nhBZkqmGxhX6NZPNrPDWScCzG4hoZmOzVmkrE6aJ3HnZWh9v+jykJDMy6Tpco08hjhi3PHNSS5lkW/a+eD4meJXyr2eMUEQdCAyzKW3LgnD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ZirqjNJ5PxqMi52VcLhwh6kC7aTYvYrfTbif1bN8aCTXE69TCJ/10zH1Weng+qN1l6FcStxAleC3bNCYhuhNj2aT4HpOfeXPodsal/tTAYga3atBgiZRIXgrLYSWtZnMSRv2gkmJ5PR65UJ9zcs1TPTkIDTa0M7/dpHKPg+LSu2O+F8ZlzIbgd9XwOppzP8HGnLtRcruznfdgvzPJZqs7+kPWXLIHhu8Tes9nJNX6a0SVmBjl8mKil26nWQB0feteLeI8JjmHRuc9542Vi1ztexLtJR4OW0hk72+wDBVuRCH/HRTRv2ithKBs0vtk7ljrWGBphetkvOIpwTHa//4r6sYEgIkcBOWsTEvbYO0QCBym8x0nDn4TRVarpWnren13NMjnJxBgfY9Bi/VJuet99+HoTPxcTFlZczNfzDtGfieN03zMeXGH/2Yl/ejmEwadJPtyVFxwiJswxL+WEGvsDbAtCnURMEGXFFy54Txlw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Apr 02, 2024 at 09:15:39PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: c0b832517f627ead3388c6f0c74e8ac10ad5774b > commit: ea7f9bb7268e89fff8590ab5a360f5b27a0fc19a [2555/3220] csky: Emulate one-byte and two-byte cmpxchg > config: csky-randconfig-r012-20230202 (https://download.01.org/0day-ci/archive/20240402/202404022106.mYwpypit-lkp@intel.com/config) > compiler: csky-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240402/202404022106.mYwpypit-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 > | Closes: https://lore.kernel.org/oe-kbuild-all/202404022106.mYwpypit-lkp@intel.com/ > > All errors (new ones prefixed by >>): And yet again, does the patch at the end of this email clear this up for you? Thanx, Paul > In file included from arch/csky/include/asm/atomic.h:9, > from include/linux/atomic.h:7, > from include/asm-generic/bitops/lock.h:5, > from arch/csky/include/asm/bitops.h:69, > from include/linux/bitops.h:68, > from include/linux/log2.h:12, > from kernel/bounds.c:13: > include/linux/atomic/atomic-arch-fallback.h: In function 'raw_atomic_cmpxchg': > >> arch/csky/include/asm/cmpxchg.h:138:25: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration] > 138 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > | ^~~~~~~~~~~~~~ > arch/csky/include/asm/cmpxchg.h:165:10: note: in expansion of macro '__cmpxchg' > 165 | (__cmpxchg((ptr), (o), (n), sizeof(*(ptr)))) > | ^~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' > 55 | #define raw_cmpxchg arch_cmpxchg > | ^~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:2026:16: note: in expansion of macro 'raw_cmpxchg' > 2026 | return raw_cmpxchg(&v->counter, old, new); > | ^~~~~~~~~~~ > >> arch/csky/include/asm/cmpxchg.h:141:25: error: implicit declaration of function 'cmpxchg_emu_u16' [-Werror=implicit-function-declaration] > 141 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ > | ^~~~~~~~~~~~~~~ > arch/csky/include/asm/cmpxchg.h:165:10: note: in expansion of macro '__cmpxchg' > 165 | (__cmpxchg((ptr), (o), (n), sizeof(*(ptr)))) > | ^~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' > 55 | #define raw_cmpxchg arch_cmpxchg > | ^~~~~~~~~~~~ > include/linux/atomic/atomic-arch-fallback.h:2026:16: note: in expansion of macro 'raw_cmpxchg' > 2026 | return raw_cmpxchg(&v->counter, old, new); > | ^~~~~~~~~~~ > cc1: some warnings being treated as errors > make[3]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1 > make[3]: Target 'prepare' not remade because of errors. > make[2]: *** [Makefile:1197: 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 +138 arch/csky/include/asm/cmpxchg.h > > 125 > 126 #define arch_cmpxchg_acquire(ptr, o, n) \ > 127 (__cmpxchg_acquire((ptr), (o), (n), sizeof(*(ptr)))) > 128 > 129 #define __cmpxchg(ptr, old, new, size) \ > 130 ({ \ > 131 __typeof__(ptr) __ptr = (ptr); \ > 132 __typeof__(new) __new = (new); \ > 133 __typeof__(new) __tmp; \ > 134 __typeof__(old) __old = (old); \ > 135 __typeof__(*(ptr)) __ret; \ > 136 switch (size) { \ > 137 case 1: \ > > 138 __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ > 139 break; \ > 140 case 2: \ > > 141 __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ > 142 break; \ > 143 case 4: \ > 144 asm volatile ( \ > 145 RELEASE_FENCE \ > 146 "1: ldex.w %0, (%3) \n" \ > 147 " cmpne %0, %4 \n" \ > 148 " bt 2f \n" \ > 149 " mov %1, %2 \n" \ > 150 " stex.w %1, (%3) \n" \ > 151 " bez %1, 1b \n" \ > 152 FULL_FENCE \ > 153 "2: \n" \ > 154 : "=&r" (__ret), "=&r" (__tmp) \ > 155 : "r" (__new), "r"(__ptr), "r"(__old) \ > 156 :); \ > 157 break; \ > 158 default: \ > 159 BUILD_BUG(); \ > 160 } \ > 161 __ret; \ > 162 }) > 163 > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki ------------------------------------------------------------------------ commit 58155a7e67f350f00c2df5b6066597fe438543cb Author: Paul E. McKenney Date: Tue Apr 2 10:24:57 2024 -0700 squash! csky: Emulate one-byte and two-byte cmpxchg [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney diff --git a/arch/csky/include/asm/cmpxchg.h b/arch/csky/include/asm/cmpxchg.h index 848a8691c5a2a..a3dc0a5b1cc3d 100644 --- a/arch/csky/include/asm/cmpxchg.h +++ b/arch/csky/include/asm/cmpxchg.h @@ -62,10 +62,10 @@ __typeof__(*(ptr)) __ret; \ switch (size) { \ case 1: \ - __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ + __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 2: \ - __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ + __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 4: \ asm volatile ( \ @@ -98,10 +98,10 @@ __typeof__(*(ptr)) __ret; \ switch (size) { \ case 1: \ - __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ + __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 2: \ - __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ + __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 4: \ asm volatile ( \ @@ -135,10 +135,10 @@ __typeof__(*(ptr)) __ret; \ switch (size) { \ case 1: \ - __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ + __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 2: \ - __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ + __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 4: \ asm volatile ( \