Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1241520

Re: [PATCH v2 2/3] word-at-a-time.h: support zero_bytemask() on alpha and tile

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Chris Metcalf <cmetcalf@ezchip.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/3] word-at-a-time.h: support zero_bytemask() on alpha and tile
Date Wed, 07 Oct 2015 16:00:02 +0200
Message-ID <qgXqa-6Da-11@gated-at.bofh.it> (permalink)
References <qgPVE-4hd-3@gated-at.bofh.it> <qgPVE-4hd-5@gated-at.bofh.it> <qgPVE-4hd-1@gated-at.bofh.it>
X-Original-To Ingo Molnar <mingo@kernel.org>
Authentication-Results spf=none (sender IP is ) smtp.mailfrom=cmetcalf@ezchip.com;
User-Agent Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version 1.0
Content-Type text/plain; charset="windows-1252"; format=flowed
Content-Transfer-Encoding 7bit
X-Originating-IP [12.216.194.146]
X-Clientproxiedby CY1PR0801CA0005.namprd08.prod.outlook.com (25.163.136.143) To AM2PR02MB0771.eurprd02.prod.outlook.com (25.163.146.156)
X-Microsoft-Exchange-Diagnostics 1;AM2PR02MB0771;2:twsfQ0NNiY28Y1Oeq89RTw+KOsGeXMujTc/c3f+N3bNJbFDKjFoTuVIwCf/EFIZt419QQKJv+jVVHCTYdjpypbuqYilCVoYuaG5rTMjeP9sgJ7BzacPTC0MWoOXSOySNu83ttQfamxps41mWqvXIzv1L6r3w+TIiF86WyePn4Do=;3:D85molzkHyjRW5c7O9agO11AINPzxhws4zSuOy24w5kMaUlD7ye2VuLa7WwVbFUvlDTjDe4YNNK5qjNKLYAuju9CBZ2jih7BfiHzhUdNFOvFK8QH9G81Z8hEev7Lp5u9unbmYTPY0j2TvlQYnqvNqw==;25:Lo2kHAG7yqkRxngtKUur5LJGma++JE9uoV7044tooQjw0KzuIxXAJWtzT/6YonfYnxww5UyzkRVHV07W3MfK5BbDRBlzTPvLjdEygP4i8q8lCSf+TTyrTgSx/AgP7uE6+CRhwv6KipPSqlEBlNSK7sK2KbMQjQI0hgpByPzVSqaHRAg5fgKwBuRAaJP8IbJ0ABWfAGkf0Omqhz7mencD8U62TG+djUSZY6Q/7t0MnaVTx4bGESAI9L13MvbxlM0qI4DKy2FCdhjOWvvKNfohqw==;20:dzv0yUkxOJv4Muj/eY4zx/EJG3MmffDjovLq2WV4VynzaOZUsAJnR7Vd7Kq1Ho32SZ7krrpwy79xzCskvI0n0J1Ht0dEYDfi52B2LTfH2I0Xl7r0W0rVCRwnsDRJKMn1S4b7hY7LAszPuAkSQcCIa7JAi1q0FmFD0WKK3lU79RA=
X-Microsoft-Antispam UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0771;
X-Microsoft-Antispam-Prvs <AM2PR02MB07717E57A4419CA3219500A2AF360@AM2PR02MB0771.eurprd02.prod.outlook.com>
X-Exchange-Antispam-Report-Test UriScan:;
X-Exchange-Antispam-Report-Cfa-Test BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001);SRVR:AM2PR02MB0771;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0771;
X-Microsoft-Exchange-Diagnostics 1;AM2PR02MB0771;4:8lt6BJ2paTcwVP4WdmFgVm0NRIxRpl3o4gan6r1jOVSTfQNL595vFEXwcz9KUHnZ6B65cI12UHxiNRQh3Zk40jlqAFj81Sj4f9DtGiYFQOmmSd6u0EuLK45e3dBbEJu1wXJ7TT7dvyJ4/yK4jOUwMNLc78sx8ZstGALImnS0I5GEA5rae2ciFcSca5elM/RRsPrBi/ULcMfZzW0S+/KCbgUvDWtji8WF0eTxDs4BNOEDPM0FGdOASBb0AuFgYxcutxoB9qZoOKJrq6EZCJxCMS2EcoWYwlF6D6xatW+Nps1LtVEdPXAGv+uUz4v1jjXjVJ5/6WYH2ZJAfWLhaPw3wL5rcmAS6ju3Lguh/8ADdKg=
X-Forefront-Prvs 0722981D2A
X-Forefront-Antispam-Report SFV:NSPM;SFS:(10009020)(6049001)(6009001)(189002)(479174004)(24454002)(199003)(377454003)(101416001)(87976001)(66066001)(42186005)(83506001)(50986999)(76176999)(65956001)(33656002)(40100003)(575784001)(106356001)(105586002)(23746002)(54356999)(65816999)(47776003)(77096005)(65806001)(64126003)(64706001)(86362001)(122386002)(97736004)(36756003)(5001920100001)(5007970100001)(5008740100001)(81156007)(5004730100002)(19580405001)(19580395003)(15975445007)(4001350100001)(110136002)(5001960100002)(92566002)(50466002)(2950100001)(46102003)(230783001)(189998001)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR02MB0771;H:[10.7.0.41];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en;
Received-Spf None (protection.outlook.com: ezchip.com does not designate permitted sender hosts)
X-Microsoft-Exchange-Diagnostics 1;AM2PR02MB0771;23:FPLNru9cNq3IEXtHfZ7S4h1AZRbaqsApY404zQ7J267JbvC6cH7Eb8NBX3QtKj71FGCsk6ZUjpvOXTJ9UEP1e7E6EWEfiBQr/LywM5Z4EPH7I9dRSzgm5BsYGr7UzRbtIeIIbKxO3nnQZ7Q/Ds+odn39P371t+rgLuXro06aT795pA2S/7PTCHWe/Ry1yRYKpJnoZusX7pjtZ4y+lgKr7C/xDPZ6OutIGkTgAfr5Qg78j0IqDisfoxbNHBZZEHq3VA7+3T9pP3Jb/n9pDtJzWlZkv6O2rcV5KeSyMKOiWUMg9+YGZIhzfd/7z1QVTnSSQX/gbEDW0FVRAiV628xr0xi1cIdCNGFSvw6A7tS04Hew3NygxQLvMSDVn15ZRHWXBMdHZKdZpo0ucWp0f9CWn2vXJDbFlMjm26yLDL4Rvu0aigyCeA+zrshi/vV992MAlvv42iQ4tljMIhRWNsb/XhRxzATcwGIrhHmewFgCqbTeXSomtF5fG3MQFJwnk/z/84hAZPI4DZEjJpzjB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1tTVHrTcGRWsFOpI8zKShX8Gjc8lvf1kf8s=;20:VO6V+5fQl//rjEwJkqmpJUZ1qIuCx7Bwf61nifHKcHB9Cz1FshWoGBY/EiMDAEpCa0R4dsmZRClDSs4pr2HqeQ==
Spamdiagnosticoutput 1:23
Spamdiagnosticmetadata NSPM
X-Originatororg ezchip.com
X-Ms-Exchange-Crosstenant-Originalarrivaltime 07 Oct 2015 13:58:36.1014 (UTC)
X-Ms-Exchange-Crosstenant-Fromentityheader Hosted
X-Ms-Exchange-Transport-Crosstenantheadersstamped AM2PR02MB0771
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 48
Organization linux.* mail to news gateway
X-Original-Cc Michael Cree <mcree@orcon.net.nz>, Matt Turner <mattst88@gmail.com>, Michael Ellerman <mpe@ellerman.id.au>, Yoshinori Sato <ysato@users.sourceforge.jp>, Alexey Dobriyan <adobriyan@gmail.com>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Linus Torvalds <torvalds@linux-foundation.org>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Thomas Gleixner <tglx@linutronix.de>, "H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>, <linux-alpha@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
X-Original-Date Wed, 7 Oct 2015 09:58:23 -0400
X-Original-Message-ID <561524FF.20807@ezchip.com>
X-Original-References <1444159429-4788-1-git-send-email-cmetcalf@ezchip.com> <1444159429-4788-3-git-send-email-cmetcalf@ezchip.com> <20151007055320.GA27737@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1241520

Show key headers only | View raw


On 10/07/2015 01:53 AM, Ingo Molnar wrote:
> * Chris Metcalf <cmetcalf@ezchip.com> wrote:
>
>> Both alpha and tile needed implementations of zero_bytemask.
>>
>> The alpha version is untested.
>>
>> Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
>> ---
>>   arch/alpha/include/asm/word-at-a-time.h | 2 ++
>>   arch/tile/include/asm/word-at-a-time.h  | 8 +++++++-
>>   2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/alpha/include/asm/word-at-a-time.h b/arch/alpha/include/asm/word-at-a-time.h
>> index 6b340d0f1521..902e6ab00a06 100644
>> --- a/arch/alpha/include/asm/word-at-a-time.h
>> +++ b/arch/alpha/include/asm/word-at-a-time.h
>> @@ -52,4 +52,6 @@ static inline unsigned long find_zero(unsigned long bits)
>>   #endif
>>   }
>>   
>> +#define zero_bytemask(mask) ((2ul << (find_zero(mask) * 8)) - 1)
> Small nit: please use a proper C inline function instead of CPP, as for example
> the PowerPC zero_bytemask() function is.

Indeed, I normally would do that.  But, I was trying to match the
existing style; there are nine definitions that are specified as macros
(including the one in asm-generic), and only one (powerpc 64-bit LE)
that was specified as an inline.

I did put together a v3 of the patch series that included all your
excellent suggestions, including the Reported-by, Tested-by, and
Reviewed-by tags, but then found out v2 was already pulled into
Linus's tree, so I guess that ship has sailed; oh well.

My inclination would be not to churn the tree with a patch to
convert those new zero_bytemask() macros to inlines, but I'm happy
to do so if you think it would be better.

-- 
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/3] word-at-a-time.h: support zero_bytemask() on  alpha and tile Ingo Molnar <mingo@kernel.org> - 2015-10-07 08:00 +0200
  Re: [PATCH v2 2/3] word-at-a-time.h: support zero_bytemask() on alpha  and tile Chris Metcalf <cmetcalf@ezchip.com> - 2015-10-07 16:00 +0200

csiph-web