All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <lkp@intel.com>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: kbuild-all@01.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [lkp] [PATCH v3 2/6] atomics: Add test for atomic operations with _relaxed variants
Date: Mon, 12 Oct 2015 23:29:14 +0800	[thread overview]
Message-ID: <20151012152914.GB18440@wfg-t540p.sh.intel.com> (raw)
In-Reply-To: <20151012145652.GJ27351@fixme-laptop.cn.ibm.com>

Hi Boqun,

The base tree detection is based on the whole patchset's

- subjects
- touched files
- TO/CC list

Log shows the files and TO/CC are strongly related to powerpc,
so it looks a natural choice to apply to it. Especially you put
"linuxppc-dev@lists.ozlabs.org" in the TO list while Peter/Ingo
in the CC list -- that looks like a strong indication for powerpc.

[2015-10-12 22:27:49] patched_files: ["arch/powerpc/include/asm/cmpxchg.h", "lib/atomic64_test.c", "include/linux/atomic.h", "arch/powerpc/include/asm/atomic.h"]
[2015-10-12 22:27:49] bases: ["powerpc/next", "powerpc/next"]

[2015-10-12 22:27:49] lists: ["linux-kernel@vger.kernel.org", "linuxppc-dev@lists.ozlabs.org", "Peter Zijlstra <peterz@infradead.org>", "Ingo Molnar <mingo@kernel.org>"
, "Benjamin Herrenschmidt <benh@kernel.crashing.org>", "Paul Mackerras <paulus@samba.org>", "Michael Ellerman <mpe@ellerman.id.au>", "Thomas Gleixner <tglx@linutronix.d
e>", "Will Deacon <will.deacon@arm.com>", "\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>", "Waiman Long <waiman.long@hp.com>", "Davidlohr Bueso <dave@stgolabs.net>"
, "Boqun Feng <boqun.feng@gmail.com>"]
[2015-10-12 22:27:49] bases: ["powerpc/next", "powerpc/next", "powerpc/next", "mpe/next", "mpe/next", "arm64/for-next/core", "arm64/for-next/core"]

The possible improvement would be to let tip:locking/core register
itself in the MAINTAINERS file to match files *cmpxchg* *atomic*.

Thanks,
Fengguang

On Mon, Oct 12, 2015 at 10:56:52PM +0800, Boqun Feng wrote:
> On Mon, Oct 12, 2015 at 10:43:56PM +0800, kbuild test robot wrote:
> > Hi Boqun,
> > 
> > [auto build test ERROR on v4.3-rc5 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
> > 
> 
> This patch should be tested based on current locking/core branch of tip
> tree. Thank you.
> 
> Regards,
> Boqun
> 
> > url:    https://github.com/0day-ci/linux/commits/Boqun-Feng/atomics-powerpc-Implement-relaxed-acquire-release-variants-of-some-atomics/20151012-222750
> > config: x86_64-randconfig-x016-10121751 (attached as .config)
> > reproduce:
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64 
> > 
> > All error/warnings (new ones prefixed by >>):
> > 
> >    In file included from include/linux/init.h:4:0,
> >                     from lib/atomic64_test.c:14:
> >    lib/atomic64_test.c: In function 'test_atomic':
> > >> lib/atomic64_test.c:60:9: error: implicit declaration of function 'atomic_inc_return_acquire' [-Werror=implicit-function-declaration]
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >             ^
> >    include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
> >     # define unlikely(x) __builtin_expect(!!(x), 0)
> >                                              ^
> > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON'
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >      ^
> > >> lib/atomic64_test.c:38:2: note: in expansion of macro 'TEST_ARGS'
> >      test(bit, op##_acquire, ##args); \
> >      ^
> > >> lib/atomic64_test.c:79:2: note: in expansion of macro 'FAMILY_TEST'
> >      FAMILY_TEST(TEST_ARGS, bit, inc_return,  \
> >      ^
> > >> lib/atomic64_test.c:113:2: note: in expansion of macro 'INC_RETURN_FAMILY_TEST'
> >      INC_RETURN_FAMILY_TEST(, v0);
> >      ^
> > >> lib/atomic64_test.c:60:9: error: implicit declaration of function 'atomic_inc_return_release' [-Werror=implicit-function-declaration]
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >             ^
> >    include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
> >     # define unlikely(x) __builtin_expect(!!(x), 0)
> >                                              ^
> > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON'
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >      ^
> >    lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_ARGS'
> >      test(bit, op##_release, ##args); \
> >      ^
> > >> lib/atomic64_test.c:79:2: note: in expansion of macro 'FAMILY_TEST'
> >      FAMILY_TEST(TEST_ARGS, bit, inc_return,  \
> >      ^
> > >> lib/atomic64_test.c:113:2: note: in expansion of macro 'INC_RETURN_FAMILY_TEST'
> >      INC_RETURN_FAMILY_TEST(, v0);
> >      ^
> > >> lib/atomic64_test.c:60:9: error: implicit declaration of function 'atomic_inc_return_relaxed' [-Werror=implicit-function-declaration]
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >             ^
> >    include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
> >     # define unlikely(x) __builtin_expect(!!(x), 0)
> >                                              ^
> > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON'
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >      ^
> >    lib/atomic64_test.c:40:2: note: in expansion of macro 'TEST_ARGS'
> >      test(bit, op##_relaxed, ##args); \
> >      ^
> > >> lib/atomic64_test.c:79:2: note: in expansion of macro 'FAMILY_TEST'
> >      FAMILY_TEST(TEST_ARGS, bit, inc_return,  \
> >      ^
> > >> lib/atomic64_test.c:113:2: note: in expansion of macro 'INC_RETURN_FAMILY_TEST'
> >      INC_RETURN_FAMILY_TEST(, v0);
> >      ^
> > >> lib/atomic64_test.c:60:9: error: implicit declaration of function 'atomic_dec_return_acquire' [-Werror=implicit-function-declaration]
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >             ^
> >    include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
> >     # define unlikely(x) __builtin_expect(!!(x), 0)
> >                                              ^
> > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON'
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >      ^
> > >> lib/atomic64_test.c:38:2: note: in expansion of macro 'TEST_ARGS'
> >      test(bit, op##_acquire, ##args); \
> >      ^
> >    lib/atomic64_test.c:85:2: note: in expansion of macro 'FAMILY_TEST'
> >      FAMILY_TEST(TEST_ARGS, bit, dec_return,  \
> >      ^
> > >> lib/atomic64_test.c:114:2: note: in expansion of macro 'DEC_RETURN_FAMILY_TEST'
> >      DEC_RETURN_FAMILY_TEST(, v0);
> >      ^
> > >> lib/atomic64_test.c:60:9: error: implicit declaration of function 'atomic_dec_return_release' [-Werror=implicit-function-declaration]
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >             ^
> >    include/linux/compiler.h:166:42: note: in definition of macro 'unlikely'
> >     # define unlikely(x) __builtin_expect(!!(x), 0)
> >                                              ^
> > >> lib/atomic64_test.c:60:2: note: in expansion of macro 'BUG_ON'
> >      BUG_ON(atomic##bit##_##op(&v, ##args) != ret);  \
> >      ^
> >    lib/atomic64_test.c:39:2: note: in expansion of macro 'TEST_ARGS'
> >      test(bit, op##_release, ##args); \
> >      ^
> >    lib/atomic64_test.c:85:2: note: in expansion of macro 'FAMILY_TEST'
> >      FAMILY_TEST(TEST_ARGS, bit, dec_return,  \
> >      ^
> > >> lib/atomic64_test.c:114:2: note: in expansion of macro 'DEC_RETURN_FAMILY_TEST'
> >      DEC_RETURN_FAMILY_TEST(, v0);
> >      ^
> > 
> > vim +/atomic_inc_return_acquire +60 lib/atomic64_test.c
> > 
> >      8	 * the Free Software Foundation; either version 2 of the License, or
> >      9	 * (at your option) any later version.
> >     10	 */
> >     11	
> >     12	#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> >     13	
> >   > 14	#include <linux/init.h>
> >     15	#include <linux/bug.h>
> >     16	#include <linux/kernel.h>
> >     17	#include <linux/atomic.h>
> >     18	
> >     19	#define TEST(bit, op, c_op, val)				\
> >     20	do {								\
> >     21		atomic##bit##_set(&v, v0);				\
> >     22		r = v0;							\
> >     23		atomic##bit##_##op(val, &v);				\
> >     24		r c_op val;						\
> >     25		WARN(atomic##bit##_read(&v) != r, "%Lx != %Lx\n",	\
> >     26			(unsigned long long)atomic##bit##_read(&v),	\
> >     27			(unsigned long long)r);				\
> >     28	} while (0)
> >     29	
> >     30	/*
> >     31	 * Test for a atomic operation family,
> >     32	 * @test should be a macro accepting parameters (bit, op, ...)
> >     33	 */
> >     34	
> >     35	#define FAMILY_TEST(test, bit, op, args...)	\
> >     36	do {						\
> >     37		test(bit, op, ##args);		\
> >   > 38		test(bit, op##_acquire, ##args);	\
> >   > 39		test(bit, op##_release, ##args);	\
> >   > 40		test(bit, op##_relaxed, ##args);	\
> >     41	} while (0)
> >     42	
> >     43	#define TEST_RETURN(bit, op, c_op, val)				\
> >     44	do {								\
> >     45		atomic##bit##_set(&v, v0);				\
> >     46		r = v0;							\
> >     47		r c_op val;						\
> >     48		BUG_ON(atomic##bit##_##op(val, &v) != r);		\
> >     49		BUG_ON(atomic##bit##_read(&v) != r);			\
> >     50	} while (0)
> >     51	
> >     52	#define RETURN_FAMILY_TEST(bit, op, c_op, val)			\
> >     53	do {								\
> >     54		FAMILY_TEST(TEST_RETURN, bit, op, c_op, val);		\
> >     55	} while (0)
> >     56	
> >     57	#define TEST_ARGS(bit, op, init, ret, expect, args...)		\
> >     58	do {								\
> >     59		atomic##bit##_set(&v, init);				\
> >   > 60		BUG_ON(atomic##bit##_##op(&v, ##args) != ret);		\
> >     61		BUG_ON(atomic##bit##_read(&v) != expect);		\
> >     62	} while (0)
> >     63	
> >     64	#define XCHG_FAMILY_TEST(bit, init, new)				\
> >     65	do {									\
> >     66		FAMILY_TEST(TEST_ARGS, bit, xchg, init, init, new, new);	\
> >     67	} while (0)
> >     68	
> >     69	#define CMPXCHG_FAMILY_TEST(bit, init, new, wrong)			\
> >     70	do {									\
> >     71		FAMILY_TEST(TEST_ARGS, bit, cmpxchg, 				\
> >     72				init, init, new, init, new);			\
> >     73		FAMILY_TEST(TEST_ARGS, bit, cmpxchg,				\
> >     74				init, init, init, wrong, new);			\
> >     75	} while (0)
> >     76	
> >     77	#define INC_RETURN_FAMILY_TEST(bit, i)			\
> >     78	do {							\
> >   > 79		FAMILY_TEST(TEST_ARGS, bit, inc_return,		\
> >     80				i, (i) + one, (i) + one);	\
> >     81	} while (0)
> >     82	
> >     83	#define DEC_RETURN_FAMILY_TEST(bit, i)			\
> >     84	do {							\
> >   > 85		FAMILY_TEST(TEST_ARGS, bit, dec_return,		\
> >     86				i, (i) - one, (i) - one);	\
> >     87	} while (0)
> >     88	
> >     89	static __init void test_atomic(void)
> >     90	{
> >     91		int v0 = 0xaaa31337;
> >     92		int v1 = 0xdeadbeef;
> >     93		int onestwos = 0x11112222;
> >     94		int one = 1;
> >     95	
> >     96		atomic_t v;
> >     97		int r;
> >     98	
> >     99		TEST(, add, +=, onestwos);
> >    100		TEST(, add, +=, -one);
> >    101		TEST(, sub, -=, onestwos);
> >    102		TEST(, sub, -=, -one);
> >    103		TEST(, or, |=, v1);
> >    104		TEST(, and, &=, v1);
> >    105		TEST(, xor, ^=, v1);
> >    106		TEST(, andnot, &= ~, v1);
> >    107	
> >    108		RETURN_FAMILY_TEST(, add_return, +=, onestwos);
> >    109		RETURN_FAMILY_TEST(, add_return, +=, -one);
> >    110		RETURN_FAMILY_TEST(, sub_return, -=, onestwos);
> >    111		RETURN_FAMILY_TEST(, sub_return, -=, -one);
> >    112	
> >  > 113		INC_RETURN_FAMILY_TEST(, v0);
> >  > 114		DEC_RETURN_FAMILY_TEST(, v0);
> >    115	
> >    116		XCHG_FAMILY_TEST(, v0, v1);
> >    117		CMPXCHG_FAMILY_TEST(, v0, v1, onestwos);
> > 
> > ---
> > 0-DAY kernel test infrastructure                Open Source Technology Center
> > https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 
> 



  parent reply	other threads:[~2015-10-12 15:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 14:14 [PATCH v3 0/6] atomics: powerpc: Implement relaxed/acquire/release variants of some atomics Boqun Feng
2015-10-12 14:14 ` [PATCH v3 1/6] powerpc: atomic: Make *xchg and *cmpxchg a full barrier Boqun Feng
2015-10-12 14:23   ` Boqun Feng
2015-10-12 14:14 ` [PATCH v3 2/6] atomics: Add test for atomic operations with _relaxed variants Boqun Feng
     [not found]   ` <201510122205.Uu3yljqf%fengguang.wu@intel.com>
     [not found]     ` <20151012145652.GJ27351@fixme-laptop.cn.ibm.com>
2015-10-12 15:29       ` Fengguang Wu [this message]
2015-10-12 15:42         ` [lkp] " Boqun Feng
2015-10-12 16:02           ` [kbuild-all] " Fengguang Wu
2015-10-12 16:09             ` Fengguang Wu
2015-10-13  1:33             ` Boqun Feng
2015-10-12 14:14 ` [PATCH v3 3/6] atomics: Allow architectures to define their own __atomic_op_* helpers Boqun Feng
2015-10-12 14:14 ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{,64}_*_return_* variants Boqun Feng
2015-10-12 14:14   ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{, 64}_*_return_* variants Boqun Feng
2015-10-13 13:21   ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{,64}_*_return_* variants Will Deacon
2015-10-13 13:21     ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{, 64}_*_return_* variants Will Deacon
2015-10-13 13:35     ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{,64}_*_return_* variants Boqun Feng
2015-10-13 13:35       ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{, 64}_*_return_* variants Boqun Feng
2015-10-14  1:00       ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{,64}_*_return_* variants Boqun Feng
2015-10-14  1:00         ` [PATCH v3 4/6] powerpc: atomic: Implement atomic{, 64}_*_return_* variants Boqun Feng
2015-10-12 14:14 ` [PATCH v3 5/6] powerpc: atomic: Implement xchg_* and atomic{,64}_xchg_* variants Boqun Feng
2015-10-12 14:14   ` [PATCH v3 5/6] powerpc: atomic: Implement xchg_* and atomic{, 64}_xchg_* variants Boqun Feng
2015-10-12 14:14 ` [PATCH v3 6/6] powerpc: atomic: Implement cmpxchg{,64}_* and atomic{,64}_cmpxchg_* variants Boqun Feng
2015-10-12 14:14   ` [PATCH v3 6/6] powerpc: atomic: Implement cmpxchg{, 64}_* and atomic{, 64}_cmpxchg_* variants Boqun Feng
2015-10-13 13:24   ` [PATCH v3 6/6] powerpc: atomic: Implement cmpxchg{,64}_* and atomic{,64}_cmpxchg_* variants Will Deacon
2015-10-13 14:32     ` Boqun Feng
2015-10-13 14:43       ` Will Deacon
2015-10-13 14:58         ` Boqun Feng
2015-10-13 15:04           ` Will Deacon
2015-10-13 15:45             ` Boqun Feng
2015-10-14  1:47             ` Boqun Feng
2015-10-14  9:40               ` Will Deacon
2015-10-13 14:46       ` Boqun Feng
2015-10-12 14:30 ` [PATCH RESEND v3 1/6] powerpc: atomic: Make *xchg and *cmpxchg a full barrier Boqun Feng
2015-10-14  0:10   ` Michael Ellerman
2015-10-14  0:51     ` Boqun Feng
2015-10-14  8:06       ` Peter Zijlstra
2015-10-14  9:26         ` Boqun Feng
2015-10-14  9:33           ` Peter Zijlstra
2015-10-14  9:43             ` Michael Ellerman
2015-10-13 12:27 ` [PATCH v3 0/6] atomics: powerpc: Implement relaxed/acquire/release variants of some atomics Peter Zijlstra
2015-10-13 15:46   ` 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=20151012152914.GB18440@wfg-t540p.sh.intel.com \
    --to=lkp@intel.com \
    --cc=boqun.feng@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.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 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.