[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cebfebb9c205a1ebc5722ca7e3b87339ceb3c79.camel@ozlabs.org>
Date: Mon, 24 Feb 2025 15:58:49 +0800
From: Jeremy Kerr <jk@...abs.org>
To: Kuan-Wei Chiu <visitorckw@...il.com>, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, joel@....id.au, eajames@...ux.ibm.com,
andrzej.hajda@...el.com, neil.armstrong@...aro.org, rfoss@...nel.org,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, airlied@...il.com, simona@...ll.ch,
dmitry.torokhov@...il.com, mchehab@...nel.org, awalls@...metrocast.net,
hverkuil@...all.nl, miquel.raynal@...tlin.com, richard@....at,
vigneshr@...com, louis.peens@...igine.com, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
parthiban.veerasooran@...rochip.com, arend.vanspriel@...adcom.com,
johannes@...solutions.net, gregkh@...uxfoundation.org,
jirislaby@...nel.org, yury.norov@...il.com, akpm@...ux-foundation.org
Cc: hpa@...or.com, alistair@...ple.id.au, linux@...musvillemoes.dk,
Laurent.pinchart@...asonboard.com, jonas@...boo.se,
jernej.skrabec@...il.com, kuba@...nel.org, linux-kernel@...r.kernel.org,
linux-fsi@...ts.ozlabs.org, dri-devel@...ts.freedesktop.org,
linux-input@...r.kernel.org, linux-media@...r.kernel.org,
linux-mtd@...ts.infradead.org, oss-drivers@...igine.com,
netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
brcm80211@...ts.linux.dev, brcm80211-dev-list.pdl@...adcom.com,
linux-serial@...r.kernel.org, bpf@...r.kernel.org, jserv@...s.ncku.edu.tw,
Yu-Chun Lin <eleanor15x@...il.com>
Subject: Re: [PATCH 00/17] Introduce and use generic parity32/64 helper
Hi Kuan-Wei,
> Several parts of the kernel contain redundant implementations of parity
> calculations for 32-bit and 64-bit values. Introduces generic
> parity32() and parity64() helpers in bitops.h, providing a standardized
> and optimized implementation.
More so than __builtin_parity() ?
I'm all for reducing the duplication, but the compiler may well have a
better parity approach than the xor-folding implementation here. Looks
like we can get this to two instructions on powerpc64, for example.
Cheers,
Jeremy
Powered by blists - more mailing lists