提交 b058661a 编写于 作者: M Martin Schwidefsky

s390/entry.S: use assembler alternatives

Replace the open coded alternatives for the BPOFF, BPON, BPENTER,
and BPEXIT macros with the new magic from asm/alternatives-asm.h
to make the code easier to read.
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 fba9eb79
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/alternative-asm.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/ctl_reg.h> #include <asm/ctl_reg.h>
...@@ -162,65 +163,22 @@ _PIF_WORK = (_PIF_PER_TRAP | _PIF_SYSCALL_RESTART) ...@@ -162,65 +163,22 @@ _PIF_WORK = (_PIF_PER_TRAP | _PIF_SYSCALL_RESTART)
.endm .endm
.macro BPOFF .macro BPOFF
.pushsection .altinstr_replacement, "ax" ALTERNATIVE "", ".long 0xb2e8c000", 82
660: .long 0xb2e8c000
.popsection
661: .long 0x47000000
.pushsection .altinstructions, "a"
.long 661b - .
.long 660b - .
.word 82
.byte 4
.byte 4
.popsection
.endm .endm
.macro BPON .macro BPON
.pushsection .altinstr_replacement, "ax" ALTERNATIVE "", ".long 0xb2e8d000", 82
662: .long 0xb2e8d000
.popsection
663: .long 0x47000000
.pushsection .altinstructions, "a"
.long 663b - .
.long 662b - .
.word 82
.byte 4
.byte 4
.popsection
.endm .endm
.macro BPENTER tif_ptr,tif_mask .macro BPENTER tif_ptr,tif_mask
.pushsection .altinstr_replacement, "ax" ALTERNATIVE "TSTMSK \tif_ptr,\tif_mask; jz .+8; .long 0xb2e8d000", \
662: .word 0xc004, 0x0000, 0x0000 # 6 byte nop "", 82
.word 0xc004, 0x0000, 0x0000 # 6 byte nop
.popsection
664: TSTMSK \tif_ptr,\tif_mask
jz . + 8
.long 0xb2e8d000
.pushsection .altinstructions, "a"
.long 664b - .
.long 662b - .
.word 82
.byte 12
.byte 12
.popsection
.endm .endm
.macro BPEXIT tif_ptr,tif_mask .macro BPEXIT tif_ptr,tif_mask
TSTMSK \tif_ptr,\tif_mask TSTMSK \tif_ptr,\tif_mask
.pushsection .altinstr_replacement, "ax" ALTERNATIVE "jz .+8; .long 0xb2e8c000", \
662: jnz . + 8 "jnz .+8; .long 0xb2e8d000", 82
.long 0xb2e8d000
.popsection
664: jz . + 8
.long 0xb2e8c000
.pushsection .altinstructions, "a"
.long 664b - .
.long 662b - .
.word 82
.byte 8
.byte 8
.popsection
.endm .endm
#ifdef CONFIG_EXPOLINE #ifdef CONFIG_EXPOLINE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册