public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Anton Blanchard <anton@ozlabs•org>,
	benh@kernel•crashing.org, paulus@samba•org,
	herbert@gondor•apana.org.au, davem@davemloft•net
Cc: alastair@d-silva•org, linuxppc-dev@lists•ozlabs.org,
	linux-crypto@vger•kernel.org
Subject: Re: [PATCH] crypto: crc32c-vpmsum - Convert to CPU feature based module autoloading
Date: Thu, 04 Aug 2016 18:38:00 +1000	[thread overview]
Message-ID: <87lh0dexp3.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1470292695-9829-1-git-send-email-anton@ozlabs.org>

Anton Blanchard <anton@ozlabs•org> writes:

> From: Anton Blanchard <anton@samba•org>
>
> This patch utilises the GENERIC_CPU_AUTOPROBE infrastructure
> to automatically load the crc32c-vpmsum module if the CPU supports
> it.
>
> Signed-off-by: Anton Blanchard <anton@samba•org>
> ---
>  arch/powerpc/crypto/crc32c-vpmsum_glue.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/crypto/crc32c-vpmsum_glue.c b/arch/powerpc/crypto/crc32c-vpmsum_glue.c
> index bfe3d37..9fa046d 100644
> --- a/arch/powerpc/crypto/crc32c-vpmsum_glue.c
> +++ b/arch/powerpc/crypto/crc32c-vpmsum_glue.c
> @@ -4,6 +4,7 @@
>  #include <linux/module.h>
>  #include <linux/string.h>
>  #include <linux/kernel.h>
> +#include <linux/cpufeature.h>
>  #include <asm/switch_to.h>
>  
>  #define CHKSUM_BLOCK_SIZE	1
> @@ -157,7 +158,7 @@ static void __exit crc32c_vpmsum_mod_fini(void)
>  	crypto_unregister_shash(&alg);
>  }
>  
> -module_init(crc32c_vpmsum_mod_init);
> +module_cpu_feature_match(PPC_MODULE_FEATURE_VEC_CRYPTO, crc32c_vpmsum_mod_init);

Is VEC_CRYPTO the right feature?

That's new power8 crypto stuff.

I thought this only used VMX? (but I haven't looked closely)

cheers

  reply	other threads:[~2016-08-04  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  6:38 [PATCH] crypto: crc32c-vpmsum - Convert to CPU feature based module autoloading Anton Blanchard
2016-08-04  8:38 ` Michael Ellerman [this message]
2016-08-04 10:26   ` Anton Blanchard
2016-08-05  6:51     ` Michael Ellerman
2016-08-08 15:22       ` Herbert Xu
2016-08-09 11:26 ` Michael Ellerman

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=87lh0dexp3.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=alastair@d-silva$(echo .)org \
    --cc=anton@ozlabs$(echo .)org \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=davem@davemloft$(echo .)net \
    --cc=herbert@gondor$(echo .)apana.org.au \
    --cc=linux-crypto@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox