summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/alternative.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2022-03-14 00:04:10 +0300
committerVasily Gorbik <gor@linux.ibm.com>2022-03-27 23:18:38 +0300
commit4afeb670710efa5cd5ed8b1d9f2d22d6ce332bcc (patch)
treee970219ad9e0ed8b83d6f0ed9d0d50faafa31bdb /arch/s390/include/asm/alternative.h
parentf09354ffd84eef3c88efa8ba6df05efe50cfd16a (diff)
downloadlinux-4afeb670710efa5cd5ed8b1d9f2d22d6ce332bcc.tar.xz
s390/alternatives: use instructions instead of byte patterns
Use readable nop instructions within the code which generates the padding areas, instead of unreadable byte patterns. The generated code is identical. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/alternative.h')
-rw-r--r--arch/s390/include/asm/alternative.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/s390/include/asm/alternative.h b/arch/s390/include/asm/alternative.h
index d3880ca764ee..6c72495c8dbb 100644
--- a/arch/s390/include/asm/alternative.h
+++ b/arch/s390/include/asm/alternative.h
@@ -71,11 +71,18 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
".if " oldinstr_pad_len(num) " > 6\n" \
"\tjg " e_oldinstr_pad_end "f\n" \
"6620:\n" \
- "\t.fill (" oldinstr_pad_len(num) " - (6620b-662b)) / 2, 2, 0x0700\n" \
+ "\t.rept (" oldinstr_pad_len(num) " - (6620b-662b)) / 2\n" \
+ "\tnopr\n" \
".else\n" \
- "\t.fill " oldinstr_pad_len(num) " / 6, 6, 0xc0040000\n" \
- "\t.fill " oldinstr_pad_len(num) " %% 6 / 4, 4, 0x47000000\n" \
- "\t.fill " oldinstr_pad_len(num) " %% 6 %% 4 / 2, 2, 0x0700\n" \
+ "\t.rept " oldinstr_pad_len(num) " / 6\n" \
+ "\t.jgnop .\n" \
+ "\t.endr\n" \
+ "\t.rept " oldinstr_pad_len(num) " %% 6 / 4\n" \
+ "\tnop\n" \
+ "\t.endr\n" \
+ "\t.rept " oldinstr_pad_len(num) " %% 6 %% 4 / 2\n" \
+ "\tnopr\n" \
+ ".endr\n" \
".endif\n"
#define OLDINSTR(oldinstr, num) \