]> git.baikalelectronics.ru Git - kernel.git/commit
s390: mark __cpacf_check_opcode() and cpacf_query_func() as __always_inline
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 17 May 2019 06:54:24 +0000 (15:54 +0900)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 28 May 2019 12:49:25 +0000 (14:49 +0200)
commit34aea05df65a8f5e7852ceb1d5451e1eb3497b41
treeb3e628c42a1d9684cc69570cde24d04facc4c230
parent5c58ccf1f4ce91293a5c8cb5458daf2cb504ec9a
s390: mark __cpacf_check_opcode() and cpacf_query_func() as __always_inline

Commit a16cfc796ab5 ("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: f9797d32f5a3 ("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>
arch/s390/include/asm/cpacf.h