s390/alternatives: avoid using jgnop mnemonic
authorVasily Gorbik <gor@linux.ibm.com>
Mon, 28 Mar 2022 21:27:54 +0000 (23:27 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 28 Mar 2022 21:27:54 +0000 (23:27 +0200)
jgnop mnemonic is only available since binutils 2.36,
kernel minimal required version is 2.23. Stick to brcl
to avoid build errors.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Fixes: 4afeb670710e ("s390/alternatives: use instructions instead of byte patterns")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/alternative-asm.h
arch/s390/include/asm/alternative.h

index 221d790..bb3837d 100644 (file)
@@ -38,7 +38,7 @@
  */
 .macro alt_pad_fill bytes
        .rept   ( \bytes ) / 6
-       jgnop   .
+       brcl    0,0
        .endr
        .rept   ( \bytes ) % 6 / 4
        nop
index 6c72495..3f2856e 100644 (file)
@@ -75,7 +75,7 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
        "\tnopr\n"                                                      \
        ".else\n"                                                       \
        "\t.rept " oldinstr_pad_len(num) " / 6\n"                       \
-       "\t.jgnop .\n"                                                  \
+       "\t.brcl 0,0\n"                                                 \
        "\t.endr\n"                                                     \
        "\t.rept " oldinstr_pad_len(num) " %% 6 / 4\n"                  \
        "\tnop\n"                                                       \