From: Matthias Kaehlcke Date: Wed, 5 Apr 2017 18:34:58 +0000 (-0700) Subject: crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT X-Git-Tag: v4.12-rc1~130^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42ae2922a68ac8d68927ccb052b486f34e5fba71;p=platform%2Fkernel%2Flinux-exynos.git crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT 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 Signed-off-by: Greg Hackmann Signed-off-by: Matthias Kaehlcke Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu --- diff --git a/arch/arm64/crypto/sha1-ce-glue.c b/arch/arm64/crypto/sha1-ce-glue.c index aefda98..6b520e3 100644 --- a/arch/arm64/crypto/sha1-ce-glue.c +++ b/arch/arm64/crypto/sha1-ce-glue.c @@ -18,7 +18,7 @@ #include #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 "); diff --git a/arch/arm64/crypto/sha2-ce-glue.c b/arch/arm64/crypto/sha2-ce-glue.c index 7cd5875..e3abe11 100644 --- a/arch/arm64/crypto/sha2-ce-glue.c +++ b/arch/arm64/crypto/sha2-ce-glue.c @@ -18,7 +18,7 @@ #include #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 ");