[dborkman:pr/bpf-tc-misc3 10/10] include/net/neighbour.h:289: undefined reference to `nd_tbl'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-tc-misc3
head: 97bdeecb686906dd717fee42dc8f4ecaf6237abc
commit: 97bdeecb686906dd717fee42dc8f4ecaf6237abc [10/10] bpf: add redirect_neigh helper as redirect drop-in
config: i386-randconfig-a011-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 97bdeecb686906dd717fee42dc8f4ecaf6237abc
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: net/core/filter.o: in function `___neigh_lookup_noref':
>> include/net/neighbour.h:289: undefined reference to `nd_tbl'
ld: net/core/filter.o: in function `bpf_out_neigh_v6':
>> net/core/filter.c:2178: undefined reference to `nd_tbl'
ld: net/core/filter.o: in function `ip6_route_output':
>> include/net/ip6_route.h:98: undefined reference to `ip6_route_output_flags'
# https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git/commit/?...
git remote add dborkman https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git
git fetch --no-tags dborkman pr/bpf-tc-misc3
git checkout 97bdeecb686906dd717fee42dc8f4ecaf6237abc
vim +289 include/net/neighbour.h
60395a20ffd741 Eric W. Biederman 2015-03-03 279
60395a20ffd741 Eric W. Biederman 2015-03-03 280 static inline struct neighbour *___neigh_lookup_noref(
60395a20ffd741 Eric W. Biederman 2015-03-03 281 struct neigh_table *tbl,
60395a20ffd741 Eric W. Biederman 2015-03-03 282 bool (*key_eq)(const struct neighbour *n, const void *pkey),
60395a20ffd741 Eric W. Biederman 2015-03-03 283 __u32 (*hash)(const void *pkey,
60395a20ffd741 Eric W. Biederman 2015-03-03 284 const struct net_device *dev,
60395a20ffd741 Eric W. Biederman 2015-03-03 285 __u32 *hash_rnd),
60395a20ffd741 Eric W. Biederman 2015-03-03 286 const void *pkey,
60395a20ffd741 Eric W. Biederman 2015-03-03 287 struct net_device *dev)
60395a20ffd741 Eric W. Biederman 2015-03-03 288 {
60395a20ffd741 Eric W. Biederman 2015-03-03 @289 struct neigh_hash_table *nht = rcu_dereference_bh(tbl->nht);
60395a20ffd741 Eric W. Biederman 2015-03-03 290 struct neighbour *n;
60395a20ffd741 Eric W. Biederman 2015-03-03 291 u32 hash_val;
60395a20ffd741 Eric W. Biederman 2015-03-03 292
60395a20ffd741 Eric W. Biederman 2015-03-03 293 hash_val = hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
60395a20ffd741 Eric W. Biederman 2015-03-03 294 for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]);
60395a20ffd741 Eric W. Biederman 2015-03-03 295 n != NULL;
60395a20ffd741 Eric W. Biederman 2015-03-03 296 n = rcu_dereference_bh(n->next)) {
60395a20ffd741 Eric W. Biederman 2015-03-03 297 if (n->dev == dev && key_eq(n, pkey))
60395a20ffd741 Eric W. Biederman 2015-03-03 298 return n;
60395a20ffd741 Eric W. Biederman 2015-03-03 299 }
60395a20ffd741 Eric W. Biederman 2015-03-03 300
60395a20ffd741 Eric W. Biederman 2015-03-03 301 return NULL;
60395a20ffd741 Eric W. Biederman 2015-03-03 302 }
60395a20ffd741 Eric W. Biederman 2015-03-03 303
:::::: The code at line 289 was first introduced by commit
:::::: 60395a20ffd74166ea373ea91418d6f98fa7fdfb neigh: Factor out ___neigh_lookup_noref
:::::: TO: Eric W. Biederman <ebiederm(a)xmission.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[RFC PATCH] kunit: mock: one_param can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
mock-macro-test.c | 10 +++++-----
mock-test.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/kunit/mock-macro-test.c b/lib/kunit/mock-macro-test.c
index d196dbee2407e7..6ed10383db1c6d 100644
--- a/lib/kunit/mock-macro-test.c
+++ b/lib/kunit/mock-macro-test.c
@@ -21,20 +21,20 @@ struct mock_macro_dummy_struct {
DECLARE_STRUCT_CLASS_MOCK_PREREQS(mock_macro_dummy_struct);
-DEFINE_STRUCT_CLASS_MOCK(METHOD(one_param), CLASS(mock_macro_dummy_struct),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(one_param), CLASS(mock_macro_dummy_struct),
RETURNS(int),
PARAMS(struct mock_macro_dummy_struct *));
-DEFINE_STRUCT_CLASS_MOCK(METHOD(two_param), CLASS(mock_macro_dummy_struct),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(two_param), CLASS(mock_macro_dummy_struct),
RETURNS(int),
PARAMS(struct mock_macro_dummy_struct *, int));
-DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX(METHOD(non_first_slot_param),
+static DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX(METHOD(non_first_slot_param),
CLASS(mock_macro_dummy_struct), HANDLE_INDEX(1),
RETURNS(int),
PARAMS(int, struct mock_macro_dummy_struct *));
-DEFINE_STRUCT_CLASS_MOCK(METHOD(void_ptr_return),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(void_ptr_return),
CLASS(mock_macro_dummy_struct),
RETURNS(void *),
PARAMS(struct mock_macro_dummy_struct *));
@@ -51,7 +51,7 @@ static int mock_macro_dummy_struct_init(
return 0;
}
-DEFINE_STRUCT_CLASS_MOCK_INIT(mock_macro_dummy_struct,
+static DEFINE_STRUCT_CLASS_MOCK_INIT(mock_macro_dummy_struct,
mock_macro_dummy_struct_init);
struct mock_macro_context {
diff --git a/lib/kunit/mock-test.c b/lib/kunit/mock-test.c
index 8a0fa33d087cbd..c5970a6a91bc73 100644
--- a/lib/kunit/mock-test.c
+++ b/lib/kunit/mock-test.c
@@ -25,7 +25,7 @@ static void adder_real_init(struct adder *adder)
}
DECLARE_STRUCT_CLASS_MOCK_PREREQS(adder);
-DEFINE_STRUCT_CLASS_MOCK(METHOD(mock_add), CLASS(adder), RETURNS(int),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(mock_add), CLASS(adder), RETURNS(int),
PARAMS(struct adder*, int, int));
DECLARE_STRUCT_CLASS_MOCK_INIT(adder);
2 years
Re: [RFC v1 10/12] kunit: mock: add class mocking support
by kernel test robot
Hi Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 10b82d5176488acee2820e5a2cf0f2ec5c3488b6]
url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-introduce-c...
base: 10b82d5176488acee2820e5a2cf0f2ec5c3488b6
config: i386-randconfig-s002-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> lib/kunit/mock-macro-test.c:54:1: sparse: sparse: symbol 'mock_macro_dummy_structmock_init' was not declared. Should it be static?
--
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [RFC v1 10/12] kunit: mock: add class mocking support
by kernel test robot
Hi Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on 10b82d5176488acee2820e5a2cf0f2ec5c3488b6]
url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-introduce-c...
base: 10b82d5176488acee2820e5a2cf0f2ec5c3488b6
config: arc-randconfig-r025-20200917 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: "mock_init_ctrl" [lib/kunit/kunit-example-test.ko] undefined!
>> ERROR: modpost: "kunit_int_return" [lib/kunit/kunit-example-test.ko] undefined!
>> ERROR: modpost: "kunit_int_eq" [lib/kunit/kunit-example-test.ko] undefined!
>> ERROR: modpost: "mock_add_matcher" [lib/kunit/kunit-example-test.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[RFC PATCH] kunit: mock: to_mock_u8_matcher can be static
by kernel test robot
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
common-mocks.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/lib/kunit/common-mocks.c b/lib/kunit/common-mocks.c
index b3a410fda63a8a..463a301518d368 100644
--- a/lib/kunit/common-mocks.c
+++ b/lib/kunit/common-mocks.c
@@ -102,21 +102,21 @@ struct mock_param_matcher *kunit_any(struct kunit *test)
#define DEFINE_MATCHER(type) DEFINE_MATCHER_WITH_TYPENAME(type, type)
-DEFINE_MATCHER(u8);
-DEFINE_MATCHER(u16);
-DEFINE_MATCHER(u32);
-DEFINE_MATCHER(u64);
-DEFINE_MATCHER(char);
-DEFINE_MATCHER_WITH_TYPENAME(uchar, unsigned char);
-DEFINE_MATCHER_WITH_TYPENAME(schar, signed char);
-DEFINE_MATCHER(short);
-DEFINE_MATCHER_WITH_TYPENAME(ushort, unsigned short);
-DEFINE_MATCHER(int);
-DEFINE_MATCHER_WITH_TYPENAME(uint, unsigned int);
-DEFINE_MATCHER(long);
-DEFINE_MATCHER_WITH_TYPENAME(ulong, unsigned long);
-DEFINE_MATCHER_WITH_TYPENAME(longlong, long long);
-DEFINE_MATCHER_WITH_TYPENAME(ulonglong, unsigned long long);
+static DEFINE_MATCHER(u8);
+static DEFINE_MATCHER(u16);
+static DEFINE_MATCHER(u32);
+static DEFINE_MATCHER(u64);
+static DEFINE_MATCHER(char);
+static DEFINE_MATCHER_WITH_TYPENAME(uchar, unsigned char);
+static DEFINE_MATCHER_WITH_TYPENAME(schar, signed char);
+static DEFINE_MATCHER(short);
+static DEFINE_MATCHER_WITH_TYPENAME(ushort, unsigned short);
+static DEFINE_MATCHER(int);
+static DEFINE_MATCHER_WITH_TYPENAME(uint, unsigned int);
+static DEFINE_MATCHER(long);
+static DEFINE_MATCHER_WITH_TYPENAME(ulong, unsigned long);
+static DEFINE_MATCHER_WITH_TYPENAME(longlong, long long);
+static DEFINE_MATCHER_WITH_TYPENAME(ulonglong, unsigned long long);
DEFINE_MATCHER_WITH_TYPENAME(ptr, void *);
2 years
Re: [RFC v1 08/12] kunit: mock: add basic matchers and actions
by kernel test robot
Hi Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 10b82d5176488acee2820e5a2cf0f2ec5c3488b6]
url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-introduce-c...
base: 10b82d5176488acee2820e5a2cf0f2ec5c3488b6
config: i386-randconfig-s002-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> lib/kunit/common-mocks.c:105:1: sparse: sparse: symbol 'to_mock_u8_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:106:1: sparse: sparse: symbol 'to_mock_u16_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:107:1: sparse: sparse: symbol 'to_mock_u32_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:108:1: sparse: sparse: symbol 'to_mock_u64_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:109:1: sparse: sparse: symbol 'to_mock_char_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:110:1: sparse: sparse: symbol 'to_mock_uchar_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:111:1: sparse: sparse: symbol 'to_mock_schar_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:112:1: sparse: sparse: symbol 'to_mock_short_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:113:1: sparse: sparse: symbol 'to_mock_ushort_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:114:1: sparse: sparse: symbol 'to_mock_int_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:115:1: sparse: sparse: symbol 'to_mock_uint_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:116:1: sparse: sparse: symbol 'to_mock_long_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:117:1: sparse: sparse: symbol 'to_mock_ulong_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:118:1: sparse: sparse: symbol 'to_mock_longlong_matcher' was not declared. Should it be static?
>> lib/kunit/common-mocks.c:119:1: sparse: sparse: symbol 'to_mock_ulonglong_matcher' was not declared. Should it be static?
lib/kunit/common-mocks.c:119:1: sparse: sparse: too many warnings
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [RFC v1 10/12] kunit: mock: add class mocking support
by kernel test robot
Hi Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 10b82d5176488acee2820e5a2cf0f2ec5c3488b6]
url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-introduce-c...
base: 10b82d5176488acee2820e5a2cf0f2ec5c3488b6
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from lib/kunit/kunit-example-test.c:10:
>> lib/kunit/kunit-example-test.c:60:33: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
60 | DEFINE_STRUCT_CLASS_MOCK(METHOD(foo), CLASS(example),
| ^~~
include/kunit/mock.h:328:15: note: in definition of macro 'DEFINE_MOCK_CLIENT_COMMON'
328 | return_type name(PARAM_LIST_FROM_TYPES(param_types)) \
| ^~~~
include/kunit/mock.h:380:3: note: in expansion of macro 'DEFINE_MOCK_METHOD_CLIENT_COMMON'
380 | DEFINE_MOCK_METHOD_CLIENT_COMMON(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/mock.h:437:3: note: in expansion of macro 'DEFINE_MOCK_METHOD_CLIENT'
437 | DEFINE_MOCK_METHOD_CLIENT(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/mock.h:459:3: note: in expansion of macro 'DEFINE_MOCK_COMMON'
459 | DEFINE_MOCK_COMMON(name, \
| ^~~~~~~~~~~~~~~~~~
include/kunit/mock.h:468:3: note: in expansion of macro 'DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX_INTERNAL'
468 | DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX_INTERNAL(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/mock.h:506:3: note: in expansion of macro 'DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX'
506 | DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/kunit/kunit-example-test.c:60:1: note: in expansion of macro 'DEFINE_STRUCT_CLASS_MOCK'
60 | DEFINE_STRUCT_CLASS_MOCK(METHOD(foo), CLASS(example),
| ^~~~~~~~~~~~~~~~~~~~~~~~
lib/kunit/kunit-example-test.c:60:26: note: in expansion of macro 'METHOD'
60 | DEFINE_STRUCT_CLASS_MOCK(METHOD(foo), CLASS(example),
| ^~~~~~
>> include/kunit/mock.h:402:28: warning: no previous prototype for 'mock_master_foo' [-Wmissing-prototypes]
402 | struct mock_expectation *mock_master_##name( \
| ^~~~~~~~~~~~
include/kunit/mock.h:420:3: note: in expansion of macro 'DEFINE_MOCK_MASTER_COMMON_INTERNAL'
420 | DEFINE_MOCK_MASTER_COMMON_INTERNAL(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/mock.h:427:3: note: in expansion of macro 'DEFINE_MOCK_MASTER_COMMON'
427 | DEFINE_MOCK_MASTER_COMMON(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/mock.h:442:3: note: in expansion of macro 'DEFINE_MOCK_METHOD_MASTER'
442 | DEFINE_MOCK_METHOD_MASTER(name, handle_index, param_types)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/mock.h:459:3: note: in expansion of macro 'DEFINE_MOCK_COMMON'
459 | DEFINE_MOCK_COMMON(name, \
| ^~~~~~~~~~~~~~~~~~
include/kunit/mock.h:468:3: note: in expansion of macro 'DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX_INTERNAL'
468 | DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX_INTERNAL(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/mock.h:506:3: note: in expansion of macro 'DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX'
506 | DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX(name, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/kunit/kunit-example-test.c:60:1: note: in expansion of macro 'DEFINE_STRUCT_CLASS_MOCK'
60 | DEFINE_STRUCT_CLASS_MOCK(METHOD(foo), CLASS(example),
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> lib/kunit/kunit-example-test.c:85:31: warning: no previous prototype for 'examplemock_init' [-Wmissing-prototypes]
85 | DEFINE_STRUCT_CLASS_MOCK_INIT(example, example_init);
| ^~~~~~~
include/kunit/mock.h:194:35: note: in definition of macro 'MOCK_INIT_ID'
194 | #define MOCK_INIT_ID(struct_name) struct_name##mock_init
| ^~~~~~~~~~~
lib/kunit/kunit-example-test.c:85:1: note: in expansion of macro 'DEFINE_STRUCT_CLASS_MOCK_INIT'
85 | DEFINE_STRUCT_CLASS_MOCK_INIT(example, example_init);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# https://github.com/0day-ci/linux/commit/80a5526fd886c8b3d5ad6ba475b3d1087...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Latypov/kunit-introduce-class-mocking-support/20200919-023253
git checkout 80a5526fd886c8b3d5ad6ba475b3d1087943f70a
vim +/foo +60 lib/kunit/kunit-example-test.c
55
56 /*
57 * This macro creates a mock implementation of the specified method of the
58 * specified class.
59 */
> 60 DEFINE_STRUCT_CLASS_MOCK(METHOD(foo), CLASS(example),
61 RETURNS(int),
62 PARAMS(struct example *, int));
63
64 /*
65 * This tells KUnit how to initialize the parts of the mock that come from the
66 * parent. In this example, all we have to do is populate the member functions
67 * of the parent class with the mock versions we defined.
68 */
69 static int example_init(struct MOCK(example) *mock_example)
70 {
71 /* This is how you get a pointer to the parent class of a mock. */
72 struct example *example = mock_get_trgt(mock_example);
73
74 /*
75 * Here we populate the member function (method) with our mock method.
76 */
77 example->foo = foo;
78 return 0;
79 }
80
81 /*
82 * This registers our parent init function above, allowing KUnit to create a
83 * constructor for the mock.
84 */
> 85 DEFINE_STRUCT_CLASS_MOCK_INIT(example, example_init);
86
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
arch/mips/include/asm/mach-loongson64/topology.h:7:27: error: implicit declaration of function 'cpu_logical_map'
by kernel test robot
Hi Paul,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 10b82d5176488acee2820e5a2cf0f2ec5c3488b6
commit: 02fce139fd14d3b0126f0a72e8c0a83b5b01f9f5 Merge tag 'mips_fixes_5.4_3' into mips-next
date: 11 months ago
config: mips-randconfig-r006-20200919 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
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
git checkout 02fce139fd14d3b0126f0a72e8c0a83b5b01f9f5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/mips/include/asm/topology.h:11,
from include/linux/topology.h:36,
from include/linux/gfp.h:9,
from include/linux/slab.h:15,
from include/linux/crypto.h:19,
from include/crypto/hash.h:11,
from include/linux/uio.h:10,
from include/linux/socket.h:8,
from include/linux/compat.h:15,
from arch/mips/kernel/asm-offsets.c:12:
include/linux/topology.h: In function 'numa_node_id':
>> arch/mips/include/asm/mach-loongson64/topology.h:7:27: error: implicit declaration of function 'cpu_logical_map' [-Werror=implicit-function-declaration]
7 | #define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
| ^~~~~~~~~~~~~~~
include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node'
119 | return cpu_to_node(raw_smp_processor_id());
| ^~~~~~~~~~~
arch/mips/kernel/asm-offsets.c: At top level:
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes]
26 | void output_ptreg_defines(void)
| ^~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes]
78 | void output_task_defines(void)
| ^~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes]
93 | void output_thread_info_defines(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes]
110 | void output_thread_defines(void)
| ^~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:138:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes]
138 | void output_thread_fpu_defines(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes]
181 | void output_mm_defines(void)
| ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:242:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes]
242 | void output_sc_defines(void)
| ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for 'output_signal_defined' [-Wmissing-prototypes]
255 | void output_signal_defined(void)
| ^~~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:334:6: warning: no previous prototype for 'output_pm_defines' [-Wmissing-prototypes]
334 | void output_pm_defines(void)
| ^~~~~~~~~~~~~~~~~
arch/mips/kernel/asm-offsets.c:348:6: warning: no previous prototype for 'output_kvm_defines' [-Wmissing-prototypes]
348 | void output_kvm_defines(void)
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:99: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:414: archprepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:179: sub-make] Error 2
make: Target 'prepare' not remade because of errors.
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 02fce139fd14d3b0126f0a72e8c0a83b5b01f9f5
vim +/cpu_logical_map +7 arch/mips/include/asm/mach-loongson64/topology.h
c46173183657bbd arch/mips/include/asm/mach-loongson/topology.h Huacai Chen 2014-06-26 6
ec0f8d3fbb7ea12 arch/mips/include/asm/mach-loongson/topology.h Huacai Chen 2014-11-04 @7 #define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
1bdb7b76705a389 arch/mips/include/asm/mach-loongson64/topology.h Jiaxun Yang 2019-10-20 8
:::::: The code at line 7 was first introduced by commit
:::::: ec0f8d3fbb7ea12cfd10083e340381b96e7c34f8 MIPS: Loongson: Allow booting from any core
:::::: TO: Huacai Chen <chenhc(a)lemote.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years