[PATCH] ARM: mm: use bitmap_zero() API
Russell King (Oracle)
linux at armlinux.org.uk
Sat May 6 03:35:32 PDT 2023
On Sat, May 06, 2023 at 04:35:22PM +0800, ye.xingchen at zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen at zte.com.cn>
>
> bitmap_zero() is faster than bitmap_clear(), so use bitmap_zero()
> instead of bitmap_clear().
Maybe in theory, but as NUM_USER_ASIDS is a power of two (256),
and therefore both start and nbits are aigned to BITMAP_MEM_ALIGNMENT,
bitmap_clear() will call memset().
The only difference between the two are that bitmap_zero() doesn't
involve the compiler working out that it can call memset() (which
will be worked out at compile time not run time).
So, I doubt that this change makes any difference what so ever to the
generated code, and thus this change is just for change sake. In
other words, it's just useless churn.
Thanks anyway.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list