Hi Joe, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: d4690f1e1cdabb4d61207b6787b1605a0dc0aeab commit: cb984d101b30eb7478d32df56a0023e4603cba7f compiler-gcc: integrate the various compiler-gcc[345].h files date: 1 year, 3 months ago config: frv-allmodconfig (attached as .config) compiler: frv-linux-gcc (GCC) 6.2.0 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout cb984d101b30eb7478d32df56a0023e4603cba7f # save the attached .config to linux build tree make.cross ARCH=frv All errors (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_atomic64': >> lib/atomic64_test.c:112:9: error: implicit declaration of function 'atomic64_add_unless' [-Werror=implicit-function-declaration] BUG_ON(atomic64_add_unless(&v, one, v0)); ^ include/linux/compiler.h:164:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ lib/atomic64_test.c:112:2: note: in expansion of macro 'BUG_ON' BUG_ON(atomic64_add_unless(&v, one, v0)); ^~~~~~ lib/atomic64_test.c:134:2: warning: #warning Please implement atomic64_dec_if_positive for your architecture and select the above Kconfig symbol [-Wcpp] #warning Please implement atomic64_dec_if_positive for your architecture and select the above Kconfig symbol ^~~~~~~ In file included from include/linux/init.h:4:0, from lib/atomic64_test.c:14: >> lib/atomic64_test.c:138:10: error: implicit declaration of function 'atomic64_inc_not_zero' [-Werror=implicit-function-declaration] BUG_ON(!atomic64_inc_not_zero(&v)); ^ include/linux/compiler.h:164:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ lib/atomic64_test.c:138:2: note: in expansion of macro 'BUG_ON' BUG_ON(!atomic64_inc_not_zero(&v)); ^~~~~~ cc1: some warnings being treated as errors vim +/atomic64_add_unless +112 lib/atomic64_test.c 86a893807 Luca Barbieri 2010-02-24 8 * the Free Software Foundation; either version 2 of the License, or 86a893807 Luca Barbieri 2010-02-24 9 * (at your option) any later version. 86a893807 Luca Barbieri 2010-02-24 10 */ b3b16d284 Fabian Frederick 2014-06-04 11 b3b16d284 Fabian Frederick 2014-06-04 12 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt b3b16d284 Fabian Frederick 2014-06-04 13 86a893807 Luca Barbieri 2010-02-24 @14 #include <linux/init.h> 50af5ead3 Paul Gortmaker 2012-01-20 15 #include <linux/bug.h> 0dbdd1bfe Peter Huewe 2010-05-24 16 #include <linux/kernel.h> 60063497a Arun Sharma 2011-07-26 17 #include <linux/atomic.h> 86a893807 Luca Barbieri 2010-02-24 18 86a893807 Luca Barbieri 2010-02-24 19 #define INIT(c) do { atomic64_set(&v, c); r = c; } while (0) 86a893807 Luca Barbieri 2010-02-24 20 static __init int test_atomic64(void) 86a893807 Luca Barbieri 2010-02-24 21 { 86a893807 Luca Barbieri 2010-02-24 22 long long v0 = 0xaaa31337c001d00dLL; 86a893807 Luca Barbieri 2010-02-24 23 long long v1 = 0xdeadbeefdeafcafeLL; 86a893807 Luca Barbieri 2010-02-24 24 long long v2 = 0xfaceabadf00df001LL; 86a893807 Luca Barbieri 2010-02-24 25 long long onestwos = 0x1111111122222222LL; 86a893807 Luca Barbieri 2010-02-24 26 long long one = 1LL; 86a893807 Luca Barbieri 2010-02-24 27 86a893807 Luca Barbieri 2010-02-24 28 atomic64_t v = ATOMIC64_INIT(v0); 86a893807 Luca Barbieri 2010-02-24 29 long long r = v0; 86a893807 Luca Barbieri 2010-02-24 30 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 31 86a893807 Luca Barbieri 2010-02-24 32 atomic64_set(&v, v1); 86a893807 Luca Barbieri 2010-02-24 33 r = v1; 86a893807 Luca Barbieri 2010-02-24 34 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 35 BUG_ON(atomic64_read(&v) != r); 86a893807 Luca Barbieri 2010-02-24 36 86a893807 Luca Barbieri 2010-02-24 37 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 38 atomic64_add(onestwos, &v); 86a893807 Luca Barbieri 2010-02-24 39 r += onestwos; 86a893807 Luca Barbieri 2010-02-24 40 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 41 86a893807 Luca Barbieri 2010-02-24 42 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 43 atomic64_add(-one, &v); 86a893807 Luca Barbieri 2010-02-24 44 r += -one; 86a893807 Luca Barbieri 2010-02-24 45 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 46 86a893807 Luca Barbieri 2010-02-24 47 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 48 r += onestwos; 86a893807 Luca Barbieri 2010-02-24 49 BUG_ON(atomic64_add_return(onestwos, &v) != r); 86a893807 Luca Barbieri 2010-02-24 50 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 51 86a893807 Luca Barbieri 2010-02-24 52 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 53 r += -one; 86a893807 Luca Barbieri 2010-02-24 54 BUG_ON(atomic64_add_return(-one, &v) != r); 86a893807 Luca Barbieri 2010-02-24 55 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 56 86a893807 Luca Barbieri 2010-02-24 57 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 58 atomic64_sub(onestwos, &v); 86a893807 Luca Barbieri 2010-02-24 59 r -= onestwos; 86a893807 Luca Barbieri 2010-02-24 60 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 61 86a893807 Luca Barbieri 2010-02-24 62 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 63 atomic64_sub(-one, &v); 86a893807 Luca Barbieri 2010-02-24 64 r -= -one; 86a893807 Luca Barbieri 2010-02-24 65 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 66 86a893807 Luca Barbieri 2010-02-24 67 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 68 r -= onestwos; 86a893807 Luca Barbieri 2010-02-24 69 BUG_ON(atomic64_sub_return(onestwos, &v) != r); 86a893807 Luca Barbieri 2010-02-24 70 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 71 86a893807 Luca Barbieri 2010-02-24 72 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 73 r -= -one; 86a893807 Luca Barbieri 2010-02-24 74 BUG_ON(atomic64_sub_return(-one, &v) != r); 86a893807 Luca Barbieri 2010-02-24 75 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 76 86a893807 Luca Barbieri 2010-02-24 77 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 78 atomic64_inc(&v); 86a893807 Luca Barbieri 2010-02-24 79 r += one; 86a893807 Luca Barbieri 2010-02-24 80 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 81 86a893807 Luca Barbieri 2010-02-24 82 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 83 r += one; 86a893807 Luca Barbieri 2010-02-24 84 BUG_ON(atomic64_inc_return(&v) != r); 86a893807 Luca Barbieri 2010-02-24 85 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 86 86a893807 Luca Barbieri 2010-02-24 87 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 88 atomic64_dec(&v); 86a893807 Luca Barbieri 2010-02-24 89 r -= one; 86a893807 Luca Barbieri 2010-02-24 90 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 91 86a893807 Luca Barbieri 2010-02-24 92 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 93 r -= one; 86a893807 Luca Barbieri 2010-02-24 94 BUG_ON(atomic64_dec_return(&v) != r); 86a893807 Luca Barbieri 2010-02-24 95 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 96 86a893807 Luca Barbieri 2010-02-24 97 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 98 BUG_ON(atomic64_xchg(&v, v1) != v0); 86a893807 Luca Barbieri 2010-02-24 99 r = v1; 86a893807 Luca Barbieri 2010-02-24 100 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 101 86a893807 Luca Barbieri 2010-02-24 102 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 103 BUG_ON(atomic64_cmpxchg(&v, v0, v1) != v0); 86a893807 Luca Barbieri 2010-02-24 104 r = v1; 86a893807 Luca Barbieri 2010-02-24 105 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 106 86a893807 Luca Barbieri 2010-02-24 107 INIT(v0); 86a893807 Luca Barbieri 2010-02-24 108 BUG_ON(atomic64_cmpxchg(&v, v2, v1) != v0); 86a893807 Luca Barbieri 2010-02-24 109 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 110 86a893807 Luca Barbieri 2010-02-24 111 INIT(v0); 9efbcd590 Luca Barbieri 2010-03-01 @112 BUG_ON(atomic64_add_unless(&v, one, v0)); 86a893807 Luca Barbieri 2010-02-24 113 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 114 86a893807 Luca Barbieri 2010-02-24 115 INIT(v0); 9efbcd590 Luca Barbieri 2010-03-01 116 BUG_ON(!atomic64_add_unless(&v, one, v1)); 86a893807 Luca Barbieri 2010-02-24 117 r += one; 86a893807 Luca Barbieri 2010-02-24 118 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 119 7463449b8 Catalin Marinas 2012-07-30 120 #ifdef CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 86a893807 Luca Barbieri 2010-02-24 121 INIT(onestwos); 86a893807 Luca Barbieri 2010-02-24 122 BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1)); 86a893807 Luca Barbieri 2010-02-24 123 r -= one; 86a893807 Luca Barbieri 2010-02-24 124 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 125 86a893807 Luca Barbieri 2010-02-24 126 INIT(0); 86a893807 Luca Barbieri 2010-02-24 127 BUG_ON(atomic64_dec_if_positive(&v) != -one); 86a893807 Luca Barbieri 2010-02-24 128 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 129 86a893807 Luca Barbieri 2010-02-24 130 INIT(-one); 86a893807 Luca Barbieri 2010-02-24 131 BUG_ON(atomic64_dec_if_positive(&v) != (-one - one)); 86a893807 Luca Barbieri 2010-02-24 132 BUG_ON(v.counter != r); 8f4f202b3 Luca Barbieri 2010-02-26 133 #else 7463449b8 Catalin Marinas 2012-07-30 134 #warning Please implement atomic64_dec_if_positive for your architecture and select the above Kconfig symbol 8f4f202b3 Luca Barbieri 2010-02-26 135 #endif 86a893807 Luca Barbieri 2010-02-24 136 86a893807 Luca Barbieri 2010-02-24 137 INIT(onestwos); 25a304f27 Luca Barbieri 2010-03-01 @138 BUG_ON(!atomic64_inc_not_zero(&v)); 86a893807 Luca Barbieri 2010-02-24 139 r += one; 86a893807 Luca Barbieri 2010-02-24 140 BUG_ON(v.counter != r); 86a893807 Luca Barbieri 2010-02-24 141 :::::: The code at line 112 was first introduced by commit :::::: 9efbcd590243045111670c171a951923b877b57d lib: Fix atomic64_add_unless test :::::: TO: Luca Barbieri <luca@xxxxxxxxxxxxxxxxx> :::::: CC: H. Peter Anvin <hpa@xxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip