* Re: linux-next: build failure after merge of the net-next tree [not found] <20211008162103.1921a7a7@canb.auug.org.au> @ 2021-10-08 5:52 ` Kalle Valo 2021-10-08 8:14 ` Geert Uytterhoeven 0 siblings, 1 reply; 4+ messages in thread From: Kalle Valo @ 2021-10-08 5:52 UTC (permalink / raw) To: Stephen Rothwell Cc: David Miller, Networking, Jouni Malinen, Pradeep Kumar Chitrapu, Linux Kernel Mailing List, Linux Next Mailing List, ath11k, linux-wireless Stephen Rothwell <sfr@canb.auug.org.au> writes: > After merging the net-next tree, today's linux-next build (xtensa, > m68k allmodconfig) failed like this: > > In file included from <command-line>:0:0: > In function 'ath11k_peer_assoc_h_smps', > inlined from 'ath11k_peer_assoc_prepare' at drivers/net/wireless/ath/ath11k/mac.c:2362:2: > include/linux/compiler_types.h:317:38: error: call to '__compiletime_assert_650' declared with attribute error: FIELD_GET: type of reg too small for mask > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > ^ > include/linux/compiler_types.h:298:4: note: in definition of macro '__compiletime_assert' > prefix ## suffix(); \ > ^ > include/linux/compiler_types.h:317:2: note: in expansion of macro '_compiletime_assert' > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > ^ > include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > ^ > include/linux/bitfield.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_MSG' > BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \ > ^ > include/linux/bitfield.h:108:3: note: in expansion of macro '__BF_FIELD_CHECK' > __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ > ^ > drivers/net/wireless/ath/ath11k/mac.c:2079:10: note: in expansion of macro 'FIELD_GET' > smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS, > ^ > > Caused by commit > > 6f4d70308e5e ("ath11k: support SMPS configuration for 6 GHz") Thanks for the report, weird that I don't see it on x86. I can't look at this in detail now, maybe later today, but I wonder if the diff below fixes the issue? At least it's cleaner than using FIELD_GET(), actually ath11k should be cleaned up to use xx_get_bits() all over. Kalle diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index d897020dd52d..3e7e569f284b 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -2076,8 +2076,8 @@ static void ath11k_peer_assoc_h_smps(struct ieee80211_sta *sta, smps = ht_cap->cap & IEEE80211_HT_CAP_SM_PS; smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT; } else { - smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS, - le16_to_cpu(sta->he_6ghz_capa.capa)); + smps = le16_get_bits(sta->he_6ghz_capa.capa, + IEEE80211_HE_6GHZ_CAP_SM_PS); } switch (smps) { -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: linux-next: build failure after merge of the net-next tree 2021-10-08 5:52 ` linux-next: build failure after merge of the net-next tree Kalle Valo @ 2021-10-08 8:14 ` Geert Uytterhoeven 2021-10-08 14:43 ` Kalle Valo 0 siblings, 1 reply; 4+ messages in thread From: Geert Uytterhoeven @ 2021-10-08 8:14 UTC (permalink / raw) To: Kalle Valo Cc: Stephen Rothwell, David Miller, Networking, Jouni Malinen, Pradeep Kumar Chitrapu, Linux Kernel Mailing List, Linux Next Mailing List, ath11k, linux-wireless Hi Kalle, On Fri, Oct 8, 2021 at 7:55 AM Kalle Valo <kvalo@codeaurora.org> wrote: > Stephen Rothwell <sfr@canb.auug.org.au> writes: > > > After merging the net-next tree, today's linux-next build (xtensa, > > m68k allmodconfig) failed like this: > > > > In file included from <command-line>:0:0: > > In function 'ath11k_peer_assoc_h_smps', > > inlined from 'ath11k_peer_assoc_prepare' at drivers/net/wireless/ath/ath11k/mac.c:2362:2: > > include/linux/compiler_types.h:317:38: error: call to '__compiletime_assert_650' declared with attribute error: FIELD_GET: type of reg too small for mask > > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > > ^ > > include/linux/compiler_types.h:298:4: note: in definition of macro '__compiletime_assert' > > prefix ## suffix(); \ > > ^ > > include/linux/compiler_types.h:317:2: note: in expansion of macro '_compiletime_assert' > > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > > ^ > > include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' > > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > > ^ > > include/linux/bitfield.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_MSG' > > BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \ > > ^ > > include/linux/bitfield.h:108:3: note: in expansion of macro '__BF_FIELD_CHECK' > > __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ > > ^ > > drivers/net/wireless/ath/ath11k/mac.c:2079:10: note: in expansion of macro 'FIELD_GET' > > smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS, > > ^ > > > > Caused by commit > > > > 6f4d70308e5e ("ath11k: support SMPS configuration for 6 GHz") > > Thanks for the report, weird that I don't see it on x86. I can't look at > this in detail now, maybe later today, but I wonder if the diff below > fixes the issue? It seems to be related to passing "le16_to_cpu(sta->he_6ghz_capa.capa)". Probably typeof(le16_to_cpu(sta->he_6ghz_capa.capa)) goes berserk. le16_to_cpu() is a complex macro on big-endian. I had expected to see a similar issue on powerpc, but I don't. Using an intermediate "u16 capa = le16_to_cpu(sta->he_6ghz_capa.capa)" fixes the problem. > At least it's cleaner than using FIELD_GET(), actually ath11k should be > cleaned up to use xx_get_bits() all over. > > Kalle > > diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c > index d897020dd52d..3e7e569f284b 100644 > --- a/drivers/net/wireless/ath/ath11k/mac.c > +++ b/drivers/net/wireless/ath/ath11k/mac.c > @@ -2076,8 +2076,8 @@ static void ath11k_peer_assoc_h_smps(struct ieee80211_sta *sta, > smps = ht_cap->cap & IEEE80211_HT_CAP_SM_PS; > smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT; > } else { > - smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS, > - le16_to_cpu(sta->he_6ghz_capa.capa)); > + smps = le16_get_bits(sta->he_6ghz_capa.capa, > + IEEE80211_HE_6GHZ_CAP_SM_PS); > } Thanks, that works, too, so (compile) Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: build failure after merge of the net-next tree 2021-10-08 8:14 ` Geert Uytterhoeven @ 2021-10-08 14:43 ` Kalle Valo 2021-10-08 15:14 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: Kalle Valo @ 2021-10-08 14:43 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Stephen Rothwell, David Miller, Networking, Jouni Malinen, Pradeep Kumar Chitrapu, Linux Kernel Mailing List, Linux Next Mailing List, ath11k, linux-wireless Hi Geert, Geert Uytterhoeven <geert@linux-m68k.org> writes: > On Fri, Oct 8, 2021 at 7:55 AM Kalle Valo <kvalo@codeaurora.org> wrote: >> Stephen Rothwell <sfr@canb.auug.org.au> writes: >> >> > After merging the net-next tree, today's linux-next build (xtensa, >> > m68k allmodconfig) failed like this: >> > >> > In file included from <command-line>:0:0: >> > In function 'ath11k_peer_assoc_h_smps', >> > inlined from 'ath11k_peer_assoc_prepare' at drivers/net/wireless/ath/ath11k/mac.c:2362:2: >> > include/linux/compiler_types.h:317:38: error: call to '__compiletime_assert_650' declared with attribute error: FIELD_GET: type of reg too small for mask >> > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) >> > ^ >> > include/linux/compiler_types.h:298:4: note: in definition of macro '__compiletime_assert' >> > prefix ## suffix(); \ >> > ^ >> > include/linux/compiler_types.h:317:2: note: in expansion of macro '_compiletime_assert' >> > _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) >> > ^ >> > include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' >> > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) >> > ^ >> > include/linux/bitfield.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_MSG' >> > BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \ >> > ^ >> > include/linux/bitfield.h:108:3: note: in expansion of macro '__BF_FIELD_CHECK' >> > __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ >> > ^ >> > drivers/net/wireless/ath/ath11k/mac.c:2079:10: note: in expansion of macro 'FIELD_GET' >> > smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS, >> > ^ >> > >> > Caused by commit >> > >> > 6f4d70308e5e ("ath11k: support SMPS configuration for 6 GHz") >> >> Thanks for the report, weird that I don't see it on x86. I can't look at >> this in detail now, maybe later today, but I wonder if the diff below >> fixes the issue? > > It seems to be related to passing "le16_to_cpu(sta->he_6ghz_capa.capa)". > Probably typeof(le16_to_cpu(sta->he_6ghz_capa.capa)) goes berserk. > le16_to_cpu() is a complex macro on big-endian. I had expected to see > a similar issue on powerpc, but I don't. > Using an intermediate "u16 capa = le16_to_cpu(sta->he_6ghz_capa.capa)" > fixes the problem. > >> At least it's cleaner than using FIELD_GET(), actually ath11k should be >> cleaned up to use xx_get_bits() all over. >> >> Kalle >> >> diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c >> index d897020dd52d..3e7e569f284b 100644 >> --- a/drivers/net/wireless/ath/ath11k/mac.c >> +++ b/drivers/net/wireless/ath/ath11k/mac.c >> @@ -2076,8 +2076,8 @@ static void ath11k_peer_assoc_h_smps(struct ieee80211_sta *sta, >> smps = ht_cap->cap & IEEE80211_HT_CAP_SM_PS; >> smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT; >> } else { >> - smps = FIELD_GET(IEEE80211_HE_6GHZ_CAP_SM_PS, >> - le16_to_cpu(sta->he_6ghz_capa.capa)); >> + smps = le16_get_bits(sta->he_6ghz_capa.capa, >> + IEEE80211_HE_6GHZ_CAP_SM_PS); >> } > > Thanks, that works, too, so (compile) > Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Thanks Geert, you helped a lot! I now submitted a patch to netdev: https://patchwork.kernel.org/project/netdevbpf/patch/20211008143932.23884-1-kvalo@codeaurora.org/ Dave & Jakub, if you can please take the patch directly to net-next. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: build failure after merge of the net-next tree 2021-10-08 14:43 ` Kalle Valo @ 2021-10-08 15:14 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2021-10-08 15:14 UTC (permalink / raw) To: kvalo Cc: geert, sfr, netdev, jouni, pradeepc, linux-kernel, linux-next, ath11k, linux-wireless From: Kalle Valo <kvalo@codeaurora.org> Date: Fri, 08 Oct 2021 17:43:39 +0300 > Thanks Geert, you helped a lot! I now submitted a patch to netdev: > > https://patchwork.kernel.org/project/netdevbpf/patch/20211008143932.23884-1-kvalo@codeaurora.org/ > > Dave & Jakub, if you can please take the patch directly to net-next. Done. -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-08 15:14 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20211008162103.1921a7a7@canb.auug.org.au> 2021-10-08 5:52 ` linux-next: build failure after merge of the net-next tree Kalle Valo 2021-10-08 8:14 ` Geert Uytterhoeven 2021-10-08 14:43 ` Kalle Valo 2021-10-08 15:14 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).