From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Xu Subject: Re: [PATCH] crypto: arm/speck - fix building in Thumb2 mode Date: Sun, 1 Jul 2018 21:18:39 +0800 Message-ID: <20180701131839.kpbwifrfgdf36p4p@gondor.apana.org.au> References: <20180618223323.130072-1-ebiggers@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Stefan Agner , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel To: Eric Biggers Return-path: Content-Disposition: inline In-Reply-To: <20180618223323.130072-1-ebiggers@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: linux-crypto.vger.kernel.org On Mon, Jun 18, 2018 at 03:33:23PM -0700, Eric Biggers wrote: > Building the kernel with CONFIG_THUMB2_KERNEL=y and > CONFIG_CRYPTO_SPECK_NEON set fails with the following errors: > > arch/arm/crypto/speck-neon-core.S: Assembler messages: > > arch/arm/crypto/speck-neon-core.S:419: Error: r13 not allowed here -- `bic sp,#0xf' > arch/arm/crypto/speck-neon-core.S:423: Error: r13 not allowed here -- `bic sp,#0xf' > arch/arm/crypto/speck-neon-core.S:427: Error: r13 not allowed here -- `bic sp,#0xf' > arch/arm/crypto/speck-neon-core.S:431: Error: r13 not allowed here -- `bic sp,#0xf' > > The problem is that the 'bic' instruction can't operate on the 'sp' > register in Thumb2 mode. Fix it by using a temporary register. This > isn't in the main loop, so the performance difference is negligible. > This also matches what aes-neonbs-core.S does. > > Reported-by: Stefan Agner > Fixes: ede9622162fa ("crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS") > Signed-off-by: Eric Biggers Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From mboxrd@z Thu Jan 1 00:00:00 1970 From: herbert@gondor.apana.org.au (Herbert Xu) Date: Sun, 1 Jul 2018 21:18:39 +0800 Subject: [PATCH] crypto: arm/speck - fix building in Thumb2 mode In-Reply-To: <20180618223323.130072-1-ebiggers@google.com> References: <20180618223323.130072-1-ebiggers@google.com> Message-ID: <20180701131839.kpbwifrfgdf36p4p@gondor.apana.org.au> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Jun 18, 2018 at 03:33:23PM -0700, Eric Biggers wrote: > Building the kernel with CONFIG_THUMB2_KERNEL=y and > CONFIG_CRYPTO_SPECK_NEON set fails with the following errors: > > arch/arm/crypto/speck-neon-core.S: Assembler messages: > > arch/arm/crypto/speck-neon-core.S:419: Error: r13 not allowed here -- `bic sp,#0xf' > arch/arm/crypto/speck-neon-core.S:423: Error: r13 not allowed here -- `bic sp,#0xf' > arch/arm/crypto/speck-neon-core.S:427: Error: r13 not allowed here -- `bic sp,#0xf' > arch/arm/crypto/speck-neon-core.S:431: Error: r13 not allowed here -- `bic sp,#0xf' > > The problem is that the 'bic' instruction can't operate on the 'sp' > register in Thumb2 mode. Fix it by using a temporary register. This > isn't in the main loop, so the performance difference is negligible. > This also matches what aes-neonbs-core.S does. > > Reported-by: Stefan Agner > Fixes: ede9622162fa ("crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS") > Signed-off-by: Eric Biggers Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt