Re: [PATCH 2/5] powerpc: module_[32|64].c: replace swap function with built-in one

From: Andrey Abramov
Date: Tue Apr 02 2019 - 15:11:27 EST


01.04.2019, 13:11, "Michael Ellerman" <mpe@xxxxxxxxxxxxxx>:
> This looks OK. It's a bit of a pity to replace the 8-byte-at-a-time copy
> with a byte-at-a-time copy, but I suspect it's insignificant compared to
> the overhead of calling the comparison and swap functions.
>
> And we could always add a generic 8-byte-at-a-time swap function if it's
> a bottleneck.

I am sorry, I forgot to quickly comment on your letter.
Now (after George Spelvin's patches) the generic swap is able
to use u64 or u32 if the alignment and size are divisible
by 4 or 8, so we lose nothing here.