Re: [PATCH] net: spider_net: Use non-atomic bitmap API when applicable

From: Geoff Levand
Date: Sat Dec 04 2021 - 10:47:58 EST


Hi Christophe,

On 11/27/21 7:18 AM, Christophe JAILLET wrote:
> No concurrent access is possible when a bitmap is local to a function.
> So prefer the non-atomic functions to save a few cycles.
> - replace a 'for' loop by an equivalent non-atomic 'bitmap_fill()' call
> - use '__set_bit()'
>
> While at it, clear the 'bitmask' bitmap only when needed.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> This patch is *not* compile tested. I don't have the needed cross compiling
> tool chain.
> ---
> drivers/net/ethernet/toshiba/spider_net.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)

As I mentioned, my tdd-builder Docker image has a
gcc-powerpc-linux-gnu cross compiler that can be used to build
a ppc64 kernel:

https://hub.docker.com/r/glevand/tdd-builder

I also have a few helper scripts to run the container and cross
compile a kernel:

https://github.com/glevand/tdd--docker/blob/master/builder/run-builder.sh
https://github.com/glevand/tdd-project/blob/master/scripts/build-linux-kernel.sh


I applied your patch to v5.16-rc3 and no spider_net warnings
or errors were seen when building with ppc64_defconfig. Thanks
for your contribution.

Acked-by: Geoff Levand <geoff@xxxxxxxxxxxxx>