Re: [PATCH] crypto: p10-aes-gcm - remove duplicate include header

From: Michael Ellerman
Date: Tue Mar 14 2023 - 06:47:52 EST


Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> writes:
> On Tue, Mar 14, 2023 at 08:47:30AM +0000, Christophe Leroy wrote:
>>
>> Any reason for resending ?
>
> The p10 patches were reverted, and have only just been re-instated.

Hmm. Seems none of them were ever Cc'ed to linuxppc-dev. So this is the
first I've seen of them.

We seem to have two almost identical copies of ppc-xlate.pl now :/

$ find . -name ppc-xlate.pl
./arch/powerpc/crypto/ppc-xlate.pl
./drivers/crypto/vmx/ppc-xlate.pl

And notably the new one doesn't have the changes from commit
505ea33089dc ("powerpc/64: Add big-endian ELFv2 flavour to crypto VMX
asm generation"), so that probably breaks the build for some configs.

There's also now two new .pl files with identical names, but different
content to the copies in drivers/crypto/vmx:

$ find . -name "*-ppc.pl" | xargs wc -l
370 ./arch/powerpc/crypto/ghashp8-ppc.pl
585 ./arch/powerpc/crypto/aesp8-ppc.pl
243 ./drivers/crypto/vmx/ghashp8-ppc.pl
3846 ./drivers/crypto/vmx/aesp8-ppc.pl
5044 total


Also PPC_MODULE_FEATURE_P10 should be in arch/powerpc/include/asm/cpufeature.h.

And CRYPTO_AES_GCM_P10 should not depend on POWER10_CPU, that restricts
it to being built when the kernel is built to run *only* on Power10,
which basically no one does, certainly no distro.

The code needs to detect at runtime if it's on Power10, and only
register itself if so.

cheers