]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT
authorMatthias Kaehlcke <mka@chromium.org>
Wed, 5 Apr 2017 18:34:58 +0000 (11:34 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 10 Apr 2017 11:17:23 +0000 (19:17 +0800)
The operand is an integer constant, make the constness explicit by
adding the modifier. This is needed for clang to generate valid code
and also works with gcc.

Also change the constraint of the operand from 'I' ("Integer constant
that is valid as an immediate operand in an ADD instruction", AArch64)
to 'i' ("An immediate integer operand").

Based-on-patch-from: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/sha1-ce-glue.c
arch/arm64/crypto/sha2-ce-glue.c

index aefda9868627bde843227d1074e7cc9b17004298..6b520e3f3ab1cea91f46fd421a1449e8927c9d36 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/module.h>
 
 #define ASM_EXPORT(sym, val) \
-       asm(".globl " #sym "; .set " #sym ", %0" :: "I"(val));
+       asm(".globl " #sym "; .set " #sym ", %c0" :: "i"(val));
 
 MODULE_DESCRIPTION("SHA1 secure hash using ARMv8 Crypto Extensions");
 MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
index 7cd587564a4176e902f12c7c7043b714caab48ea..e3abe11de48c5bb27e2428d62102f28d2801c935 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/module.h>
 
 #define ASM_EXPORT(sym, val) \
-       asm(".globl " #sym "; .set " #sym ", %0" :: "I"(val));
+       asm(".globl " #sym "; .set " #sym ", %c0" :: "i"(val));
 
 MODULE_DESCRIPTION("SHA-224/SHA-256 secure hash using ARMv8 Crypto Extensions");
 MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");