linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] x86: turn off wrongly enabled CONFIG_GENERIC_HWEIGHT
@ 2019-02-18  5:59 Masahiro Yamada
  2019-02-18  5:59 ` [PATCH 1/2] wireless: mt76: call hweight8() instead of __sw_hweight8() Masahiro Yamada
  2019-02-18  5:59 ` [PATCH 2/2] x86: disable CONFIG_GENERIC_HWEIGHT and remove __HAVE_ARCH_SW_HWEIGHT Masahiro Yamada
  0 siblings, 2 replies; 11+ messages in thread
From: Masahiro Yamada @ 2019-02-18  5:59 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, Borislav Petkov, H . Peter Anvin, x86
  Cc: Kalle Valo, linux-wireless, Christoph Hellwig, Masahiro Yamada,
	David S. Miller, netdev, linux-kernel, Lorenzo Bianconi,
	linux-mediatek, linux-arm-kernel, Felix Fietkau,
	Matthias Brugger


x86 should not enable CONFIG_GENERIC_HWEIGHT
because lib/hweight.c is not used by x86.

The only user is drivers/net/wireless/mediatek/mt76/mac80211.c

Of course, this driver is wrong since drivers should use the
generic API, hweight8().

After fixing it, x86 does not need to compile lib/hweight.c at all.

The real implementation is located in arch/x86/lib/hweight.S



Masahiro Yamada (2):
  wireless: mt76: call hweight8() instead of __sw_hweight8()
  x86: disable CONFIG_GENERIC_HWEIGHT and remove __HAVE_ARCH_SW_HWEIGHT

 arch/x86/Kconfig                              | 3 ---
 arch/x86/include/asm/arch_hweight.h           | 2 --
 drivers/net/wireless/mediatek/mt76/mac80211.c | 2 +-
 lib/hweight.c                                 | 4 ----
 4 files changed, 1 insertion(+), 10 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-02-19  4:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18  5:59 [PATCH 0/2] x86: turn off wrongly enabled CONFIG_GENERIC_HWEIGHT Masahiro Yamada
2019-02-18  5:59 ` [PATCH 1/2] wireless: mt76: call hweight8() instead of __sw_hweight8() Masahiro Yamada
2019-02-18 18:08   ` Kalle Valo
2019-02-18 19:06     ` Kalle Valo
2019-02-18 19:20       ` Kalle Valo
2019-02-18 21:49         ` Borislav Petkov
2019-02-19  1:13         ` Masahiro Yamada
2019-02-19  4:06           ` Kalle Valo
2019-02-18  5:59 ` [PATCH 2/2] x86: disable CONFIG_GENERIC_HWEIGHT and remove __HAVE_ARCH_SW_HWEIGHT Masahiro Yamada
2019-02-18  8:09   ` Borislav Petkov
2019-02-19  1:16   ` Masahiro Yamada

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).