From patchwork Mon Feb 18 05:59:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10817345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A47351399 for ; Mon, 18 Feb 2019 06:02:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C19D2A50C for ; Mon, 18 Feb 2019 06:02:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89DC429FDB; Mon, 18 Feb 2019 06:02:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 313AD29FDB for ; Mon, 18 Feb 2019 06:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=UA1WWDw+CEBDQfgg6/Us/51nTd4+gpQtXmG6CGYcUMQ=; b=Yrx yFtQTu7x0B3LDQTGb13IBP/6iYk1PTDawpbzjpubxqHRYsH/f5pHCy3GnfMHbkt9fMgmA+xUIr5yS s1fWPjHfUozNY5RQzqx4UgiKqbKp/yzA5amoqdZR/3nehUp9/cVtz0nGq5LV7mcH7PBMNByk1GwNF vtzhfR1E7i6TU12d/ILisB4IV7jDN/pJvtuZ4G++89cOxXdtsLz7RNMuOJW2HUz87J+HZe0Rjqnbx JkNHWPeAUcJXHv6+p/dd4drcL+K3yHBFrY7JT60uu4ubjSoMX/ujREdjvGSPuw75hJe0Kkp1lpaKF 000U+dtyVGtCINsDK/JjNw5p+JyjC7w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvc05-0000GX-AL; Mon, 18 Feb 2019 06:01:57 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvbzv-00008b-Gz; Mon, 18 Feb 2019 06:01:49 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x1I617hP006910; Mon, 18 Feb 2019 15:01:07 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x1I617hP006910 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1550469668; bh=NxLW51joWyvnJN1RnKNbaCQPsjav24QXUL7FZQbjRU0=; h=From:To:Cc:Subject:Date:From; b=R81ueSNdiAOMm8788ckrvP8r9ErabEmk5m+otXRzuz1n03mpjh4VN8EnOnqFC7lZb rwYgt2hpW+j1yBo026+MPCTjDyfNb/e494jiJc7GIIht5ePf/LYcpA5I1KybzYdyxK VltDqvGWePalbRuSiZhB0vcBdKmOHEFBhZU7eMXR9flrlaPLDY27IjagBAAWB8878u XZZiC1rp/F+4vo86Cq41tdoY5NXn3jVcnAQcODYcX6kaycLn7pnVXnFSVDXluwy8JA eaoIUGJpeNn2RhxYjWCkb2URNZXrhxjYUOmLW/U7r1zdfLRQpVftSaahLEfbyp9wxd z5AG2TANZMfCA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Ingo Molnar , Thomas Gleixner , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org Subject: [PATCH 0/2] x86: turn off wrongly enabled CONFIG_GENERIC_HWEIGHT Date: Mon, 18 Feb 2019 14:59:29 +0900 Message-Id: <1550469571-25933-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190217_220147_892037_CCFABD30 X-CRM114-Status: UNSURE ( 7.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthias Brugger , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Masahiro Yamada , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Lorenzo Bianconi , Christoph Hellwig , Kalle Valo , Felix Fietkau MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-)