* [PATCH] [RFC] crypto: sha1/arm - fix build with CONFIG_THUMB2_KERNEL
@ 2012-10-30 10:07 Jussi Kivilinna
2012-10-31 0:25 ` David McCullough
0 siblings, 1 reply; 2+ messages in thread
From: Jussi Kivilinna @ 2012-10-30 10:07 UTC (permalink / raw)
Cc: David McCullough, linux-crypto, linux-arm-kernel
Building cryptodev-2.6 tree with CONFIG_THUMB2_KERNEL=y and
CONFIG_CRYPTO_SHA1_ARM=y give following error:
AS arch/arm/crypto/sha1-armv4-large.o
arch/arm/crypto/sha1-armv4-large.S: Assembler messages:
arch/arm/crypto/sha1-armv4-large.S:197: Error: r13 not allowed here --
`teq r14,sp'
arch/arm/crypto/sha1-armv4-large.S:377: Error: r13 not allowed here --
`teq r14,sp'
arch/arm/crypto/sha1-armv4-large.S:469: Error: r13 not allowed here --
`teq r14,sp'
Build can be fixed with adding '.arm' at head of sha1-armv4-large.S.
However I'm not sure if this correct fix as this is my first stab
at arm assembler and I could not get CONFIG_THUMB2_KERNEL boot up
on 'qemu-system-arm -M vexpress-a9' to verify correctness. So this
is only build tested.
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-crypto@vger.kernel.org
Cc: David McCullough <ucdevel@gmail.com>
---
arch/arm/crypto/sha1-armv4-large.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/crypto/sha1-armv4-large.S b/arch/arm/crypto/sha1-armv4-large.S
index 7050ab1..e8a55eb 100644
--- a/arch/arm/crypto/sha1-armv4-large.S
+++ b/arch/arm/crypto/sha1-armv4-large.S
@@ -53,6 +53,8 @@
.text
+.arm
+
.global sha1_block_data_order
.type sha1_block_data_order,%function
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [RFC] crypto: sha1/arm - fix build with CONFIG_THUMB2_KERNEL
2012-10-30 10:07 [PATCH] [RFC] crypto: sha1/arm - fix build with CONFIG_THUMB2_KERNEL Jussi Kivilinna
@ 2012-10-31 0:25 ` David McCullough
0 siblings, 0 replies; 2+ messages in thread
From: David McCullough @ 2012-10-31 0:25 UTC (permalink / raw)
To: Jussi Kivilinna; +Cc: David McCullough, linux-crypto, linux-arm-kernel
Jussi Kivilinna wrote the following:
> Building cryptodev-2.6 tree with CONFIG_THUMB2_KERNEL=y and
> CONFIG_CRYPTO_SHA1_ARM=y give following error:
>
> AS arch/arm/crypto/sha1-armv4-large.o
> arch/arm/crypto/sha1-armv4-large.S: Assembler messages:
> arch/arm/crypto/sha1-armv4-large.S:197: Error: r13 not allowed here --
> `teq r14,sp'
> arch/arm/crypto/sha1-armv4-large.S:377: Error: r13 not allowed here --
> `teq r14,sp'
> arch/arm/crypto/sha1-armv4-large.S:469: Error: r13 not allowed here --
> `teq r14,sp'
>
> Build can be fixed with adding '.arm' at head of sha1-armv4-large.S.
> However I'm not sure if this correct fix as this is my first stab
> at arm assembler and I could not get CONFIG_THUMB2_KERNEL boot up
> on 'qemu-system-arm -M vexpress-a9' to verify correctness. So this
> is only build tested.
That fixes the problem for the assembler, in that you have forced it to
treat the code as 32 bit (non-thumb).
I know you can mix thumb and non-thumb code, and it seems that as long as
all parties know what code is in what mode it should work.
Unfortunately I don't know enough about it be sure this is a valid fix.
I think we need a long term arm expert to pass judgement on this one,
unless of source you manage to get it tested. I don't have any thumb
targets I can try it on, sory,
Cheers,
Davidm
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-crypto@vger.kernel.org
> Cc: David McCullough <ucdevel@gmail.com>
> ---
> arch/arm/crypto/sha1-armv4-large.S | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/crypto/sha1-armv4-large.S b/arch/arm/crypto/sha1-armv4-large.S
> index 7050ab1..e8a55eb 100644
> --- a/arch/arm/crypto/sha1-armv4-large.S
> +++ b/arch/arm/crypto/sha1-armv4-large.S
> @@ -53,6 +53,8 @@
>
> .text
>
> +.arm
> +
> .global sha1_block_data_order
> .type sha1_block_data_order,%function
>
>
--
David McCullough, davidm@spottygum.com, Ph: 0410 560 763
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-31 0:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30 10:07 [PATCH] [RFC] crypto: sha1/arm - fix build with CONFIG_THUMB2_KERNEL Jussi Kivilinna
2012-10-31 0:25 ` David McCullough
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox