summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-17 15:54:24 +0900
committerHeiko Carstens <heiko.carstens@de.ibm.com>2019-05-28 14:49:25 +0200
commitd83623c5eab25f5a83e308f24b1e6a4cb8628eb5 (patch)
treeb3e628c42a1d9684cc69570cde24d04facc4c230 /arch/s390
parentbf2f1eeed0b5461ecda385f1716c2b65add54579 (diff)
s390: mark __cpacf_check_opcode() and cpacf_query_func() as __always_inline
Commit e60fb8bf68d4 ("s390/cpacf: mark scpacf_query() as __always_inline") was not enough to make sure to meet the 'i' (immediate) constraint for the asm operands. With CONFIG_OPTIMIZE_INLINING enabled, Laura Abbott reported error with gcc 9.1.1: In file included from arch/s390/crypto/prng.c:29: ./arch/s390/include/asm/cpacf.h: In function 'cpacf_query_func': ./arch/s390/include/asm/cpacf.h:170:2: warning: asm operand 3 probably doesn't match constraints 170 | asm volatile( | ^~~ ./arch/s390/include/asm/cpacf.h:170:2: error: impossible constraint in 'asm' Add more __always_inline to force inlining. Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") Reported-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/cpacf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h
index 27696755daa9..e3d53eb6bcf5 100644
--- a/arch/s390/include/asm/cpacf.h
+++ b/arch/s390/include/asm/cpacf.h
@@ -178,7 +178,7 @@ static inline void __cpacf_query(unsigned int opcode, cpacf_mask_t *mask)
: "cc");
}
-static inline int __cpacf_check_opcode(unsigned int opcode)
+static __always_inline int __cpacf_check_opcode(unsigned int opcode)
{
switch (opcode) {
case CPACF_KMAC:
@@ -218,7 +218,7 @@ static inline int cpacf_test_func(cpacf_mask_t *mask, unsigned int func)
return (mask->bytes[func >> 3] & (0x80 >> (func & 7))) != 0;
}
-static inline int cpacf_query_func(unsigned int opcode, unsigned int func)
+static __always_inline int cpacf_query_func(unsigned int opcode, unsigned int func)
{
cpacf_mask_t mask;