[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <wzneefjojgfpgrp3w6llst3kazrczmyrmudubqijnupvijwwxb@22744d27arra>
Date: Sat, 5 Jul 2025 17:04:24 +0200
From: Uwe Kleine-König <ukleinek@...nel.org>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-pwm@...r.kernel.org,
Benjamin Larsson <benjamin.larsson@...exis.eu>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Lorenzo Bianconi <lorenzo@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v21] pwm: airoha: Add support for EN7581 SoC
On Sat, Jul 05, 2025 at 10:54:14AM +0200, Christian Marangi wrote:
> I used do_div since it can calculate both division and remainder in one
> go.
On 32bit archs do_div is definitively more expensive than a 32bit / + a
32bit %. So the latter is the way to go. And given that these operations
are native on all archs, there is no do_div32. And I'd expect that the
compiler can use the synergies (if any on a given arch) when a division
and a modulo operation with the same parameters is done.
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists