linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler
       [not found] <20170127104039.29351-1-mbrugger@suse.com>
@ 2017-01-27 10:43 ` Ard Biesheuvel
  2017-01-27 10:52   ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2017-01-27 10:43 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Herbert Xu, Catalin Marinas, Will Deacon, Alexander Graf,
	linux-kernel, linux-crypto, Yazen Ghannam, David S. Miller,
	linux-arm-kernel

Hi Mathias,

On 27 January 2017 at 10:40, Matthias Brugger <mbrugger@suse.com> wrote:
> Older compilers may not be able to detect the crc32 extended cpu type.

What do you mean 'detect'? Could you describe the failure in more detail please?

> Anyway only inline assembler code is used, which gets passed to the
> assembler. This patch moves the crc detection to the assembler.
>
> Suggested-by: Alexander Graf <agraf@suse.de>
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> ---
>  arch/arm64/crypto/Makefile      | 2 --
>  arch/arm64/crypto/crc32-arm64.c | 3 +++
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
> index aa8888d7b744..0d779dac75cd 100644
> --- a/arch/arm64/crypto/Makefile
> +++ b/arch/arm64/crypto/Makefile
> @@ -48,8 +48,6 @@ CFLAGS_aes-glue-ce.o  := -DUSE_V8_CRYPTO_EXTENSIONS
>
>  obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
>
> -CFLAGS_crc32-arm64.o   := -mcpu=generic+crc
> -
>  $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
>         $(call if_changed_rule,cc_o_c)
>
> diff --git a/arch/arm64/crypto/crc32-arm64.c b/arch/arm64/crypto/crc32-arm64.c
> index 6a37c3c6b11d..10f5dd075323 100644
> --- a/arch/arm64/crypto/crc32-arm64.c
> +++ b/arch/arm64/crypto/crc32-arm64.c
> @@ -29,6 +29,9 @@ MODULE_AUTHOR("Yazen Ghannam <yazen.ghannam@linaro.org>");
>  MODULE_DESCRIPTION("CRC32 and CRC32C using optional ARMv8 instructions");
>  MODULE_LICENSE("GPL v2");
>
> +/* Request crc extension capabilities from the assembler */
> +asm(".arch_extension crc");
> +

Will should confirm, but I think this is a recent feature in GAS for
AArch64, so this may break older toolchains as well.

>  #define CRC32X(crc, value) __asm__("crc32x %w[c], %w[c], %x[v]":[c]"+r"(crc):[v]"r"(value))
>  #define CRC32W(crc, value) __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value))
>  #define CRC32H(crc, value) __asm__("crc32h %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value))
> --
> 2.11.0
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler
  2017-01-27 10:43 ` [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler Ard Biesheuvel
@ 2017-01-27 10:52   ` Will Deacon
  2017-02-01  9:07     ` Ard Biesheuvel
  0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2017-01-27 10:52 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Matthias Brugger, Herbert Xu, Catalin Marinas, Alexander Graf,
	linux-kernel, linux-crypto, Yazen Ghannam, David S. Miller,
	linux-arm-kernel

On Fri, Jan 27, 2017 at 10:43:16AM +0000, Ard Biesheuvel wrote:
> On 27 January 2017 at 10:40, Matthias Brugger <mbrugger@suse.com> wrote:
> > Older compilers may not be able to detect the crc32 extended cpu type.
> 
> What do you mean 'detect'? Could you describe the failure in more detail
> please?
> 
> > Anyway only inline assembler code is used, which gets passed to the
> > assembler. This patch moves the crc detection to the assembler.
> >
> > Suggested-by: Alexander Graf <agraf@suse.de>
> > Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> > ---
> >  arch/arm64/crypto/Makefile      | 2 --
> >  arch/arm64/crypto/crc32-arm64.c | 3 +++
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
> > index aa8888d7b744..0d779dac75cd 100644
> > --- a/arch/arm64/crypto/Makefile
> > +++ b/arch/arm64/crypto/Makefile
> > @@ -48,8 +48,6 @@ CFLAGS_aes-glue-ce.o  := -DUSE_V8_CRYPTO_EXTENSIONS
> >
> >  obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
> >
> > -CFLAGS_crc32-arm64.o   := -mcpu=generic+crc
> > -
> >  $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
> >         $(call if_changed_rule,cc_o_c)
> >
> > diff --git a/arch/arm64/crypto/crc32-arm64.c b/arch/arm64/crypto/crc32-arm64.c
> > index 6a37c3c6b11d..10f5dd075323 100644
> > --- a/arch/arm64/crypto/crc32-arm64.c
> > +++ b/arch/arm64/crypto/crc32-arm64.c
> > @@ -29,6 +29,9 @@ MODULE_AUTHOR("Yazen Ghannam <yazen.ghannam@linaro.org>");
> >  MODULE_DESCRIPTION("CRC32 and CRC32C using optional ARMv8 instructions");
> >  MODULE_LICENSE("GPL v2");
> >
> > +/* Request crc extension capabilities from the assembler */
> > +asm(".arch_extension crc");
> > +
> 
> Will should confirm, but I think this is a recent feature in GAS for
> AArch64, so this may break older toolchains as well.

Yes, the .arch_extension directive isn't universally supported by AArch64
gas so we can't rely on it unconditionally. The best bet is to check for
the support and, if it's not present, then disable whatever feature relies
on it. See the lseinstr variable in Makefile.

Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler
  2017-01-27 10:52   ` Will Deacon
@ 2017-02-01  9:07     ` Ard Biesheuvel
  2017-02-01  9:43       ` Ard Biesheuvel
  0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2017-02-01  9:07 UTC (permalink / raw)
  To: Will Deacon
  Cc: Matthias Brugger, Herbert Xu, David S. Miller, Catalin Marinas,
	Yazen Ghannam, Alexander Graf, linux-crypto, linux-arm-kernel,
	linux-kernel

On 27 January 2017 at 10:52, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Jan 27, 2017 at 10:43:16AM +0000, Ard Biesheuvel wrote:
>> On 27 January 2017 at 10:40, Matthias Brugger <mbrugger@suse.com> wrote:
>> > Older compilers may not be able to detect the crc32 extended cpu type.
>>
>> What do you mean 'detect'? Could you describe the failure in more detail
>> please?
>>
>> > Anyway only inline assembler code is used, which gets passed to the
>> > assembler. This patch moves the crc detection to the assembler.
>> >
>> > Suggested-by: Alexander Graf <agraf@suse.de>
>> > Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>> > ---
>> >  arch/arm64/crypto/Makefile      | 2 --
>> >  arch/arm64/crypto/crc32-arm64.c | 3 +++
>> >  2 files changed, 3 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
>> > index aa8888d7b744..0d779dac75cd 100644
>> > --- a/arch/arm64/crypto/Makefile
>> > +++ b/arch/arm64/crypto/Makefile
>> > @@ -48,8 +48,6 @@ CFLAGS_aes-glue-ce.o  := -DUSE_V8_CRYPTO_EXTENSIONS
>> >
>> >  obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
>> >
>> > -CFLAGS_crc32-arm64.o   := -mcpu=generic+crc
>> > -
>> >  $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
>> >         $(call if_changed_rule,cc_o_c)
>> >
>> > diff --git a/arch/arm64/crypto/crc32-arm64.c b/arch/arm64/crypto/crc32-arm64.c
>> > index 6a37c3c6b11d..10f5dd075323 100644
>> > --- a/arch/arm64/crypto/crc32-arm64.c
>> > +++ b/arch/arm64/crypto/crc32-arm64.c
>> > @@ -29,6 +29,9 @@ MODULE_AUTHOR("Yazen Ghannam <yazen.ghannam@linaro.org>");
>> >  MODULE_DESCRIPTION("CRC32 and CRC32C using optional ARMv8 instructions");
>> >  MODULE_LICENSE("GPL v2");
>> >
>> > +/* Request crc extension capabilities from the assembler */
>> > +asm(".arch_extension crc");
>> > +
>>
>> Will should confirm, but I think this is a recent feature in GAS for
>> AArch64, so this may break older toolchains as well.
>
> Yes, the .arch_extension directive isn't universally supported by AArch64
> gas so we can't rely on it unconditionally. The best bet is to check for
> the support and, if it's not present, then disable whatever feature relies
> on it. See the lseinstr variable in Makefile.
>

Actually, this driver has become somewhat redundant now that we have
an alternative that combines an implementation based on 64x64
polynomial multiplication with an implementation based on the CRC32
instructions.

I will propose a patch that makes the latter usable when only the
CRC32 instructions are supported.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler
  2017-02-01  9:07     ` Ard Biesheuvel
@ 2017-02-01  9:43       ` Ard Biesheuvel
  2017-02-01 13:58         ` Alexander Graf
  0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2017-02-01  9:43 UTC (permalink / raw)
  To: Will Deacon
  Cc: Matthias Brugger, Herbert Xu, David S. Miller, Catalin Marinas,
	Yazen Ghannam, Alexander Graf, linux-crypto, linux-arm-kernel,
	linux-kernel

On 1 February 2017 at 09:07, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 27 January 2017 at 10:52, Will Deacon <will.deacon@arm.com> wrote:
>> On Fri, Jan 27, 2017 at 10:43:16AM +0000, Ard Biesheuvel wrote:
>>> On 27 January 2017 at 10:40, Matthias Brugger <mbrugger@suse.com> wrote:
>>> > Older compilers may not be able to detect the crc32 extended cpu type.
>>>
>>> What do you mean 'detect'? Could you describe the failure in more detail
>>> please?
>>>
>>> > Anyway only inline assembler code is used, which gets passed to the
>>> > assembler. This patch moves the crc detection to the assembler.
>>> >
>>> > Suggested-by: Alexander Graf <agraf@suse.de>
>>> > Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>> > ---
>>> >  arch/arm64/crypto/Makefile      | 2 --
>>> >  arch/arm64/crypto/crc32-arm64.c | 3 +++
>>> >  2 files changed, 3 insertions(+), 2 deletions(-)
>>> >
>>> > diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
>>> > index aa8888d7b744..0d779dac75cd 100644
>>> > --- a/arch/arm64/crypto/Makefile
>>> > +++ b/arch/arm64/crypto/Makefile
>>> > @@ -48,8 +48,6 @@ CFLAGS_aes-glue-ce.o  := -DUSE_V8_CRYPTO_EXTENSIONS
>>> >
>>> >  obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
>>> >
>>> > -CFLAGS_crc32-arm64.o   := -mcpu=generic+crc
>>> > -
>>> >  $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
>>> >         $(call if_changed_rule,cc_o_c)
>>> >
>>> > diff --git a/arch/arm64/crypto/crc32-arm64.c b/arch/arm64/crypto/crc32-arm64.c
>>> > index 6a37c3c6b11d..10f5dd075323 100644
>>> > --- a/arch/arm64/crypto/crc32-arm64.c
>>> > +++ b/arch/arm64/crypto/crc32-arm64.c
>>> > @@ -29,6 +29,9 @@ MODULE_AUTHOR("Yazen Ghannam <yazen.ghannam@linaro.org>");
>>> >  MODULE_DESCRIPTION("CRC32 and CRC32C using optional ARMv8 instructions");
>>> >  MODULE_LICENSE("GPL v2");
>>> >
>>> > +/* Request crc extension capabilities from the assembler */
>>> > +asm(".arch_extension crc");
>>> > +
>>>
>>> Will should confirm, but I think this is a recent feature in GAS for
>>> AArch64, so this may break older toolchains as well.
>>
>> Yes, the .arch_extension directive isn't universally supported by AArch64
>> gas so we can't rely on it unconditionally. The best bet is to check for
>> the support and, if it's not present, then disable whatever feature relies
>> on it. See the lseinstr variable in Makefile.
>>
>
> Actually, this driver has become somewhat redundant now that we have
> an alternative that combines an implementation based on 64x64
> polynomial multiplication with an implementation based on the CRC32
> instructions.
>
> I will propose a patch that makes the latter usable when only the
> CRC32 instructions are supported.

... although you still haven't explained what the actual problem is
that you are trying to solve.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler
  2017-02-01  9:43       ` Ard Biesheuvel
@ 2017-02-01 13:58         ` Alexander Graf
  2017-02-01 15:12           ` Ard Biesheuvel
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Graf @ 2017-02-01 13:58 UTC (permalink / raw)
  To: Ard Biesheuvel, Will Deacon
  Cc: Matthias Brugger, Herbert Xu, David S. Miller, Catalin Marinas,
	Yazen Ghannam, linux-crypto, linux-arm-kernel, linux-kernel

On 02/01/2017 10:43 AM, Ard Biesheuvel wrote:
> On 1 February 2017 at 09:07, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>> On 27 January 2017 at 10:52, Will Deacon <will.deacon@arm.com> wrote:
>>> On Fri, Jan 27, 2017 at 10:43:16AM +0000, Ard Biesheuvel wrote:
>>>> On 27 January 2017 at 10:40, Matthias Brugger <mbrugger@suse.com> wrote:
>>>>> Older compilers may not be able to detect the crc32 extended cpu type.
>>>> What do you mean 'detect'? Could you describe the failure in more detail
>>>> please?
>>>>
>>>>> Anyway only inline assembler code is used, which gets passed to the
>>>>> assembler. This patch moves the crc detection to the assembler.
>>>>>
>>>>> Suggested-by: Alexander Graf <agraf@suse.de>
>>>>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>>>> ---
>>>>>   arch/arm64/crypto/Makefile      | 2 --
>>>>>   arch/arm64/crypto/crc32-arm64.c | 3 +++
>>>>>   2 files changed, 3 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
>>>>> index aa8888d7b744..0d779dac75cd 100644
>>>>> --- a/arch/arm64/crypto/Makefile
>>>>> +++ b/arch/arm64/crypto/Makefile
>>>>> @@ -48,8 +48,6 @@ CFLAGS_aes-glue-ce.o  := -DUSE_V8_CRYPTO_EXTENSIONS
>>>>>
>>>>>   obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
>>>>>
>>>>> -CFLAGS_crc32-arm64.o   := -mcpu=generic+crc
>>>>> -
>>>>>   $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
>>>>>          $(call if_changed_rule,cc_o_c)
>>>>>
>>>>> diff --git a/arch/arm64/crypto/crc32-arm64.c b/arch/arm64/crypto/crc32-arm64.c
>>>>> index 6a37c3c6b11d..10f5dd075323 100644
>>>>> --- a/arch/arm64/crypto/crc32-arm64.c
>>>>> +++ b/arch/arm64/crypto/crc32-arm64.c
>>>>> @@ -29,6 +29,9 @@ MODULE_AUTHOR("Yazen Ghannam <yazen.ghannam@linaro.org>");
>>>>>   MODULE_DESCRIPTION("CRC32 and CRC32C using optional ARMv8 instructions");
>>>>>   MODULE_LICENSE("GPL v2");
>>>>>
>>>>> +/* Request crc extension capabilities from the assembler */
>>>>> +asm(".arch_extension crc");
>>>>> +
>>>> Will should confirm, but I think this is a recent feature in GAS for
>>>> AArch64, so this may break older toolchains as well.
>>> Yes, the .arch_extension directive isn't universally supported by AArch64
>>> gas so we can't rely on it unconditionally. The best bet is to check for
>>> the support and, if it's not present, then disable whatever feature relies
>>> on it. See the lseinstr variable in Makefile.
>>>
>> Actually, this driver has become somewhat redundant now that we have
>> an alternative that combines an implementation based on 64x64
>> polynomial multiplication with an implementation based on the CRC32
>> instructions.
>>
>> I will propose a patch that makes the latter usable when only the
>> CRC32 instructions are supported.
> ... although you still haven't explained what the actual problem is
> that you are trying to solve.



The problem is that in Leap 42.2 (as well as SLES12 SP2) we have a 4.8 
based system compiler, but recent binutils. That means that while our 
assembler is happy to work with crc instructions, passing the -mcpu 
parameter to gcc fails because gcc isn't aware of the flavor yet.

That in turn means that we want to tell the assembler about feature 
requirements rather than the compiler. Fortunately the ".arch_extension" 
primitive allows you to do so.

As far as checking for availability of it goes, I agree that it'd be 
nice to check if ".arch_extension" is supported. But so would be to 
check if -mcpu=generic+crc is supported. IMHO this patch doesn't make 
the current non-checking situation any worse. But of course checking is 
always nicer than not checking :)


Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler
  2017-02-01 13:58         ` Alexander Graf
@ 2017-02-01 15:12           ` Ard Biesheuvel
  0 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2017-02-01 15:12 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Will Deacon, Matthias Brugger, Herbert Xu, David S. Miller,
	Catalin Marinas, Yazen Ghannam, linux-crypto, linux-arm-kernel,
	linux-kernel

On 1 February 2017 at 13:58, Alexander Graf <agraf@suse.de> wrote:
> On 02/01/2017 10:43 AM, Ard Biesheuvel wrote:
>>
>> On 1 February 2017 at 09:07, Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> wrote:
>>>
>>> On 27 January 2017 at 10:52, Will Deacon <will.deacon@arm.com> wrote:
>>>>
>>>> On Fri, Jan 27, 2017 at 10:43:16AM +0000, Ard Biesheuvel wrote:
>>>>>
>>>>> On 27 January 2017 at 10:40, Matthias Brugger <mbrugger@suse.com>
>>>>> wrote:
>>>>>>
>>>>>> Older compilers may not be able to detect the crc32 extended cpu type.
>>>>>
>>>>> What do you mean 'detect'? Could you describe the failure in more
>>>>> detail
>>>>> please?
>>>>>
>>>>>> Anyway only inline assembler code is used, which gets passed to the
>>>>>> assembler. This patch moves the crc detection to the assembler.
>>>>>>
>>>>>> Suggested-by: Alexander Graf <agraf@suse.de>
>>>>>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>>>>> ---
>>>>>>   arch/arm64/crypto/Makefile      | 2 --
>>>>>>   arch/arm64/crypto/crc32-arm64.c | 3 +++
>>>>>>   2 files changed, 3 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile
>>>>>> index aa8888d7b744..0d779dac75cd 100644
>>>>>> --- a/arch/arm64/crypto/Makefile
>>>>>> +++ b/arch/arm64/crypto/Makefile
>>>>>> @@ -48,8 +48,6 @@ CFLAGS_aes-glue-ce.o  := -DUSE_V8_CRYPTO_EXTENSIONS
>>>>>>
>>>>>>   obj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
>>>>>>
>>>>>> -CFLAGS_crc32-arm64.o   := -mcpu=generic+crc
>>>>>> -
>>>>>>   $(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
>>>>>>          $(call if_changed_rule,cc_o_c)
>>>>>>
>>>>>> diff --git a/arch/arm64/crypto/crc32-arm64.c
>>>>>> b/arch/arm64/crypto/crc32-arm64.c
>>>>>> index 6a37c3c6b11d..10f5dd075323 100644
>>>>>> --- a/arch/arm64/crypto/crc32-arm64.c
>>>>>> +++ b/arch/arm64/crypto/crc32-arm64.c
>>>>>> @@ -29,6 +29,9 @@ MODULE_AUTHOR("Yazen Ghannam
>>>>>> <yazen.ghannam@linaro.org>");
>>>>>>   MODULE_DESCRIPTION("CRC32 and CRC32C using optional ARMv8
>>>>>> instructions");
>>>>>>   MODULE_LICENSE("GPL v2");
>>>>>>
>>>>>> +/* Request crc extension capabilities from the assembler */
>>>>>> +asm(".arch_extension crc");
>>>>>> +
>>>>>
>>>>> Will should confirm, but I think this is a recent feature in GAS for
>>>>> AArch64, so this may break older toolchains as well.
>>>>
>>>> Yes, the .arch_extension directive isn't universally supported by
>>>> AArch64
>>>> gas so we can't rely on it unconditionally. The best bet is to check for
>>>> the support and, if it's not present, then disable whatever feature
>>>> relies
>>>> on it. See the lseinstr variable in Makefile.
>>>>
>>> Actually, this driver has become somewhat redundant now that we have
>>> an alternative that combines an implementation based on 64x64
>>> polynomial multiplication with an implementation based on the CRC32
>>> instructions.
>>>
>>> I will propose a patch that makes the latter usable when only the
>>> CRC32 instructions are supported.
>>
>> ... although you still haven't explained what the actual problem is
>> that you are trying to solve.
>
>
>
>
> The problem is that in Leap 42.2 (as well as SLES12 SP2) we have a 4.8 based
> system compiler, but recent binutils. That means that while our assembler is
> happy to work with crc instructions, passing the -mcpu parameter to gcc
> fails because gcc isn't aware of the flavor yet.
>
> That in turn means that we want to tell the assembler about feature
> requirements rather than the compiler. Fortunately the ".arch_extension"
> primitive allows you to do so.
>
> As far as checking for availability of it goes, I agree that it'd be nice to
> check if ".arch_extension" is supported. But so would be to check if
> -mcpu=generic+crc is supported. IMHO this patch doesn't make the current
> non-checking situation any worse. But of course checking is always nicer
> than not checking :)
>

Well, I am pretty sure binutils v2.25 and older are in wider use than
GCC v4.8 and older, which means the runtime test would disable the CRC
module altogether for a lot of users.

However, as I mentioned, we can also remove this driver once the PMULL
based one is updated.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-01 15:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170127104039.29351-1-mbrugger@suse.com>
2017-01-27 10:43 ` [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler Ard Biesheuvel
2017-01-27 10:52   ` Will Deacon
2017-02-01  9:07     ` Ard Biesheuvel
2017-02-01  9:43       ` Ard Biesheuvel
2017-02-01 13:58         ` Alexander Graf
2017-02-01 15:12           ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).