* [linux-next:master 13298/13818] net/netfilter/nft_set_pipapo_avx2.c:1094:7: error: implicit declaration of function 'boot_cpu_has'; did you mean 'get_cpu_mask'?
@ 2020-04-08 12:19 kbuild test robot
2020-04-08 15:00 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-04-08 12:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7920 bytes --]
Hi Jason,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5798bd75ab137611da5c4cb11b6795d14cb60ba2
commit: 00daa7c606a0f6863501acd89cd6f559f9ecd46b [13298/13818] x86: update AS_* macros to binutils >=2.23, supporting ADX and AVX2
config: um-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 00daa7c606a0f6863501acd89cd6f559f9ecd46b
# save the attached .config to linux build tree
make ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from net/netfilter/nft_set_pipapo_avx2.h:5:0,
from net/netfilter/nft_set_pipapo.c:342:
>> arch/x86/include/asm/fpu/xstate.h:50:29: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:53:46: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:54:51: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_xstate_to_user(void __user *ubuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:55:34: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:56:32: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
^~~~~~~~~~~
>> arch/x86/include/asm/fpu/xstate.h:59:48: warning: 'struct xstate_header' declared inside parameter list will not be visible outside of this definition or declaration
extern int validate_xstate_header(const struct xstate_header *hdr);
^~~~~~~~~~~~~
--
In file included from net/netfilter/nft_set_pipapo_avx2.h:5:0,
from net/netfilter/nft_set_pipapo_avx2.c:24:
>> arch/x86/include/asm/fpu/xstate.h:50:29: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:53:46: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:54:51: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_xstate_to_user(void __user *ubuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:55:34: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
^~~~~~~~~~~
arch/x86/include/asm/fpu/xstate.h:56:32: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
^~~~~~~~~~~
>> arch/x86/include/asm/fpu/xstate.h:59:48: warning: 'struct xstate_header' declared inside parameter list will not be visible outside of this definition or declaration
extern int validate_xstate_header(const struct xstate_header *hdr);
^~~~~~~~~~~~~
net/netfilter/nft_set_pipapo_avx2.c: In function 'nft_pipapo_avx2_estimate':
>> net/netfilter/nft_set_pipapo_avx2.c:1094:7: error: implicit declaration of function 'boot_cpu_has'; did you mean 'get_cpu_mask'? [-Werror=implicit-function-declaration]
if (!boot_cpu_has(X86_FEATURE_AVX2) || !boot_cpu_has(X86_FEATURE_AVX))
^~~~~~~~~~~~
get_cpu_mask
cc1: some warnings being treated as errors
vim +1094 net/netfilter/nft_set_pipapo_avx2.c
7400b063969bdca Stefano Brivio 2020-03-07 1078
7400b063969bdca Stefano Brivio 2020-03-07 1079 /**
7400b063969bdca Stefano Brivio 2020-03-07 1080 * nft_pipapo_avx2_estimate() - Set size, space and lookup complexity
7400b063969bdca Stefano Brivio 2020-03-07 1081 * @desc: Set description, element count and field description used
7400b063969bdca Stefano Brivio 2020-03-07 1082 * @features: Flags: NFT_SET_INTERVAL needs to be there
7400b063969bdca Stefano Brivio 2020-03-07 1083 * @est: Storage for estimation data
7400b063969bdca Stefano Brivio 2020-03-07 1084 *
7400b063969bdca Stefano Brivio 2020-03-07 1085 * Return: true if set is compatible and AVX2 available, false otherwise.
7400b063969bdca Stefano Brivio 2020-03-07 1086 */
7400b063969bdca Stefano Brivio 2020-03-07 1087 bool nft_pipapo_avx2_estimate(const struct nft_set_desc *desc, u32 features,
7400b063969bdca Stefano Brivio 2020-03-07 1088 struct nft_set_estimate *est)
7400b063969bdca Stefano Brivio 2020-03-07 1089 {
eb16933aa5beb25 Stefano Brivio 2020-03-07 1090 if (!(features & NFT_SET_INTERVAL) ||
eb16933aa5beb25 Stefano Brivio 2020-03-07 1091 desc->field_count < NFT_PIPAPO_MIN_FIELDS)
7400b063969bdca Stefano Brivio 2020-03-07 1092 return false;
7400b063969bdca Stefano Brivio 2020-03-07 1093
7400b063969bdca Stefano Brivio 2020-03-07 @1094 if (!boot_cpu_has(X86_FEATURE_AVX2) || !boot_cpu_has(X86_FEATURE_AVX))
7400b063969bdca Stefano Brivio 2020-03-07 1095 return false;
7400b063969bdca Stefano Brivio 2020-03-07 1096
7400b063969bdca Stefano Brivio 2020-03-07 1097 est->size = pipapo_estimate_size(desc);
7400b063969bdca Stefano Brivio 2020-03-07 1098 if (!est->size)
7400b063969bdca Stefano Brivio 2020-03-07 1099 return false;
7400b063969bdca Stefano Brivio 2020-03-07 1100
7400b063969bdca Stefano Brivio 2020-03-07 1101 est->lookup = NFT_SET_CLASS_O_LOG_N;
7400b063969bdca Stefano Brivio 2020-03-07 1102
7400b063969bdca Stefano Brivio 2020-03-07 1103 est->space = NFT_SET_CLASS_O_N;
7400b063969bdca Stefano Brivio 2020-03-07 1104
7400b063969bdca Stefano Brivio 2020-03-07 1105 return true;
7400b063969bdca Stefano Brivio 2020-03-07 1106 }
7400b063969bdca Stefano Brivio 2020-03-07 1107
:::::: The code at line 1094 was first introduced by commit
:::::: 7400b063969bdca4a06cd97f1294d765c8eecbe1 nft_set_pipapo: Introduce AVX2-based lookup implementation
:::::: TO: Stefano Brivio <sbrivio@redhat.com>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 22255 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:master 13298/13818] net/netfilter/nft_set_pipapo_avx2.c:1094:7: error: implicit declaration of function 'boot_cpu_has'; did you mean 'get_cpu_mask'?
2020-04-08 12:19 [linux-next:master 13298/13818] net/netfilter/nft_set_pipapo_avx2.c:1094:7: error: implicit declaration of function 'boot_cpu_has'; did you mean 'get_cpu_mask'? kbuild test robot
@ 2020-04-08 15:00 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2020-04-08 15:00 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 10917 bytes --]
Hi Jason,
I will squash the following for now.
diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
index cd0d6ad48650..0e0ded87e27b 100644
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
@@ -83,8 +83,10 @@ nf_tables-objs := nf_tables_core.o nf_tables_api.o
nft_chain_filter.o \
nft_set_pipapo.o
ifdef CONFIG_X86_64
+ifndef CONFIG_UML
nf_tables-objs += nft_set_pipapo_avx2.o
endif
+endif
obj-$(CONFIG_NF_TABLES) += nf_tables.o
obj-$(CONFIG_NFT_COMPAT) += nft_compat.o
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 5e4a38bfb9c5..4471393da6d8 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -3291,7 +3291,7 @@ static const struct nft_set_type *nft_set_types[] = {
&nft_set_rhash_type,
&nft_set_bitmap_type,
&nft_set_rbtree_type,
-#if defined(CONFIG_X86_64)
+#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
&nft_set_pipapo_avx2_type,
#endif
&nft_set_pipapo_type,
diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c
index 459a4758d6fa..8b5acc6910fd 100644
--- a/net/netfilter/nft_set_pipapo.c
+++ b/net/netfilter/nft_set_pipapo.c
@@ -2201,7 +2201,7 @@ const struct nft_set_type nft_set_pipapo_type = {
},
};
-#if defined(CONFIG_X86_64)
+#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
const struct nft_set_type nft_set_pipapo_avx2_type = {
.features = NFT_SET_INTERVAL | NFT_SET_MAP | NFT_SET_OBJECT |
NFT_SET_TIMEOUT,
diff --git a/net/netfilter/nft_set_pipapo_avx2.h
b/net/netfilter/nft_set_pipapo_avx2.h
index ef87496a2c1e..394bcb704db7 100644
--- a/net/netfilter/nft_set_pipapo_avx2.h
+++ b/net/netfilter/nft_set_pipapo_avx2.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _NFT_SET_PIPAPO_AVX2_H
-#ifdef CONFIG_X86_64
+#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
#include <asm/fpu/xstate.h>
#define NFT_PIPAPO_ALIGN (XSAVE_YMM_SIZE / BITS_PER_BYTE)
@@ -9,6 +9,6 @@ bool nft_pipapo_avx2_lookup(const struct net *net,
const struct nft_set *set,
const u32 *key, const struct nft_set_ext **ext);
bool nft_pipapo_avx2_estimate(const struct nft_set_desc *desc, u32 features,
struct nft_set_estimate *est);
-#endif /* CONFIG_X86_64 */
+#endif /* defined(CONFIG_X86_64) && !defined(CONFIG_UML) */
#endif /* _NFT_SET_PIPAPO_AVX2_H */
On Wed, Apr 8, 2020 at 9:19 PM kbuild test robot <lkp@intel.com> wrote:
>
> Hi Jason,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 5798bd75ab137611da5c4cb11b6795d14cb60ba2
> commit: 00daa7c606a0f6863501acd89cd6f559f9ecd46b [13298/13818] x86: update AS_* macros to binutils >=2.23, supporting ADX and AVX2
> config: um-allyesconfig (attached as .config)
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce:
> git checkout 00daa7c606a0f6863501acd89cd6f559f9ecd46b
> # save the attached .config to linux build tree
> make ARCH=um
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from net/netfilter/nft_set_pipapo_avx2.h:5:0,
> from net/netfilter/nft_set_pipapo.c:342:
> >> arch/x86/include/asm/fpu/xstate.h:50:29: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:53:46: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:54:51: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_xstate_to_user(void __user *ubuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:55:34: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:56:32: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
> ^~~~~~~~~~~
> >> arch/x86/include/asm/fpu/xstate.h:59:48: warning: 'struct xstate_header' declared inside parameter list will not be visible outside of this definition or declaration
> extern int validate_xstate_header(const struct xstate_header *hdr);
> ^~~~~~~~~~~~~
> --
> In file included from net/netfilter/nft_set_pipapo_avx2.h:5:0,
> from net/netfilter/nft_set_pipapo_avx2.c:24:
> >> arch/x86/include/asm/fpu/xstate.h:50:29: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:53:46: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:54:51: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_xstate_to_user(void __user *ubuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:55:34: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
> ^~~~~~~~~~~
> arch/x86/include/asm/fpu/xstate.h:56:32: warning: 'struct xregs_state' declared inside parameter list will not be visible outside of this definition or declaration
> int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
> ^~~~~~~~~~~
> >> arch/x86/include/asm/fpu/xstate.h:59:48: warning: 'struct xstate_header' declared inside parameter list will not be visible outside of this definition or declaration
> extern int validate_xstate_header(const struct xstate_header *hdr);
> ^~~~~~~~~~~~~
> net/netfilter/nft_set_pipapo_avx2.c: In function 'nft_pipapo_avx2_estimate':
> >> net/netfilter/nft_set_pipapo_avx2.c:1094:7: error: implicit declaration of function 'boot_cpu_has'; did you mean 'get_cpu_mask'? [-Werror=implicit-function-declaration]
> if (!boot_cpu_has(X86_FEATURE_AVX2) || !boot_cpu_has(X86_FEATURE_AVX))
> ^~~~~~~~~~~~
> get_cpu_mask
> cc1: some warnings being treated as errors
>
> vim +1094 net/netfilter/nft_set_pipapo_avx2.c
>
> 7400b063969bdca Stefano Brivio 2020-03-07 1078
> 7400b063969bdca Stefano Brivio 2020-03-07 1079 /**
> 7400b063969bdca Stefano Brivio 2020-03-07 1080 * nft_pipapo_avx2_estimate() - Set size, space and lookup complexity
> 7400b063969bdca Stefano Brivio 2020-03-07 1081 * @desc: Set description, element count and field description used
> 7400b063969bdca Stefano Brivio 2020-03-07 1082 * @features: Flags: NFT_SET_INTERVAL needs to be there
> 7400b063969bdca Stefano Brivio 2020-03-07 1083 * @est: Storage for estimation data
> 7400b063969bdca Stefano Brivio 2020-03-07 1084 *
> 7400b063969bdca Stefano Brivio 2020-03-07 1085 * Return: true if set is compatible and AVX2 available, false otherwise.
> 7400b063969bdca Stefano Brivio 2020-03-07 1086 */
> 7400b063969bdca Stefano Brivio 2020-03-07 1087 bool nft_pipapo_avx2_estimate(const struct nft_set_desc *desc, u32 features,
> 7400b063969bdca Stefano Brivio 2020-03-07 1088 struct nft_set_estimate *est)
> 7400b063969bdca Stefano Brivio 2020-03-07 1089 {
> eb16933aa5beb25 Stefano Brivio 2020-03-07 1090 if (!(features & NFT_SET_INTERVAL) ||
> eb16933aa5beb25 Stefano Brivio 2020-03-07 1091 desc->field_count < NFT_PIPAPO_MIN_FIELDS)
> 7400b063969bdca Stefano Brivio 2020-03-07 1092 return false;
> 7400b063969bdca Stefano Brivio 2020-03-07 1093
> 7400b063969bdca Stefano Brivio 2020-03-07 @1094 if (!boot_cpu_has(X86_FEATURE_AVX2) || !boot_cpu_has(X86_FEATURE_AVX))
> 7400b063969bdca Stefano Brivio 2020-03-07 1095 return false;
> 7400b063969bdca Stefano Brivio 2020-03-07 1096
> 7400b063969bdca Stefano Brivio 2020-03-07 1097 est->size = pipapo_estimate_size(desc);
> 7400b063969bdca Stefano Brivio 2020-03-07 1098 if (!est->size)
> 7400b063969bdca Stefano Brivio 2020-03-07 1099 return false;
> 7400b063969bdca Stefano Brivio 2020-03-07 1100
> 7400b063969bdca Stefano Brivio 2020-03-07 1101 est->lookup = NFT_SET_CLASS_O_LOG_N;
> 7400b063969bdca Stefano Brivio 2020-03-07 1102
> 7400b063969bdca Stefano Brivio 2020-03-07 1103 est->space = NFT_SET_CLASS_O_N;
> 7400b063969bdca Stefano Brivio 2020-03-07 1104
> 7400b063969bdca Stefano Brivio 2020-03-07 1105 return true;
> 7400b063969bdca Stefano Brivio 2020-03-07 1106 }
> 7400b063969bdca Stefano Brivio 2020-03-07 1107
>
> :::::: The code at line 1094 was first introduced by commit
> :::::: 7400b063969bdca4a06cd97f1294d765c8eecbe1 nft_set_pipapo: Introduce AVX2-based lookup implementation
>
> :::::: TO: Stefano Brivio <sbrivio@redhat.com>
> :::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
--
Best Regards
Masahiro Yamada
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-08 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 12:19 [linux-next:master 13298/13818] net/netfilter/nft_set_pipapo_avx2.c:1094:7: error: implicit declaration of function 'boot_cpu_has'; did you mean 'get_cpu_mask'? kbuild test robot
2020-04-08 15:00 ` Masahiro Yamada
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.