All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Joel Stanley <joel@jms.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, dtsen@linux.ibm.com
Subject: Re: [PATCH] powerpc/crypto: Fix aes-gcm-p10 build when VSX=n
Date: Fri, 26 May 2023 00:18:07 +1000	[thread overview]
Message-ID: <87cz2otrz4.fsf@mail.lhotse> (raw)
In-Reply-To: <CACPK8XdNMBm6D-EQU0BGfxrtzbXLJaLeqzUXDMDb3eAe-T4Bxg@mail.gmail.com>

Joel Stanley <joel@jms.id.au> writes:
> On Mon, 15 May 2023 at 12:48, Michael Ellerman <mpe@ellerman.id.au> wrote:
>>
>> When VSX is disabled, eg. microwatt_defconfig, the build fails with:
>>
>>   In function ‘enable_kernel_vsx’,
>>       inlined from ‘vsx_begin’ at arch/powerpc/crypto/aes-gcm-p10-glue.c:68:2,
>>       inlined from ‘p10_aes_gcm_crypt.constprop’ at arch/powerpc/crypto/aes-gcm-p10-glue.c:244:2:
>>   ...
>>   arch/powerpc/include/asm/switch_to.h:86:9: note: in expansion of macro ‘BUILD_BUG’
>>      86 |         BUILD_BUG();
>>         |         ^~~~~~~~~
>>
>> Fix it by making the p10-aes-gcm code depend on VSX.
>>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
>
>> ---
>>  arch/powerpc/crypto/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig
>> index 7113f9355165..ad1872518992 100644
>> --- a/arch/powerpc/crypto/Kconfig
>> +++ b/arch/powerpc/crypto/Kconfig
>> @@ -96,7 +96,7 @@ config CRYPTO_AES_PPC_SPE
>>
>>  config CRYPTO_AES_GCM_P10
>>         tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
>> -       depends on PPC64 && CPU_LITTLE_ENDIAN
>> +       depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
>
> VSX depends on PPC_BOOK3S_64 but I guess there's no harm in keeping
> the PPC64 here?

I guess it's somewhat redundant. But also harmless, and possibly clearer
for folks who don't have the ingrained knowledge that VSX is 64-bit
Book3S only. So yeah I think I'll leave it as-is.

cheers

      reply	other threads:[~2023-05-25 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 12:47 [PATCH] powerpc/crypto: Fix aes-gcm-p10 build when VSX=n Michael Ellerman
2023-05-17  1:51 ` Joel Stanley
2023-05-25 14:18   ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cz2otrz4.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=dtsen@linux.ibm.com \
    --cc=joel@jms.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.