Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754276AbcC2C4O (ORCPT ); Mon, 28 Mar 2016 22:56:14 -0400 Received: from smtprelay0131.hostedemail.com ([216.40.44.131]:43768 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751324AbcC2C4L (ORCPT ); Mon, 28 Mar 2016 22:56:11 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:152:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2693:2827:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3873:4321:5007:6119:7903:10004:10400:10848:11232:11658:11783:11914:12517:12519:12740:13069:13095:13311:13357:13894:14040:14659:14721:21080:30054:30064:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: patch22_185d3ee576708 X-Filterd-Recvd-Size: 1834 Message-ID: <1459220164.25110.41.camel@perches.com> Subject: Re: [PATCH 01/31] bitops: add parity functions From: Joe Perches To: Zeng Zhaoxiu , Sam Ravnborg Cc: Denys Vlasenko , Arnd Bergmann , Andrew Morton , Martin Kepplinger , Sasha Levin , Ingo Molnar , Yury Norov , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, "David S. Miller" Date: Mon, 28 Mar 2016 19:56:04 -0700 In-Reply-To: <56F9E818.1050508@gmail.com> References: <1458788612-4367-1-git-send-email-zhaoxiu.zeng@gmail.com> <56F3A77D.6060802@redhat.com> <56F75490.9010608@gmail.com> <20160328065106.GA12154@ravnborg.org> <56F9E818.1050508@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 577 Lines: 16 On Tue, 2016-03-29 at 10:27 +0800, Zeng Zhaoxiu wrote: > 在 2016年03月28日 14:51, Sam Ravnborg 写道: [] > > Defining these as static inlines in asm-generic prevent an > > architecture > > from selecting between a more optimal asm version or the generic version > > at run-time. > > sparc would benefit from this as only some sparc chips supports popc. > > See how this is done for hweight* > > > > Sam > Thanks. I will try. You might also try to describe in any commit message and perhaps the internal documentation why using gcc's __builtin_parity isn't appropriate.