Skip to content

Commit

Permalink
s390/mcck: optimize user mode check in case of !CONFIG_KVM
Browse files Browse the repository at this point in the history
In case of the !CONFIG_KVM use "jz" instead of "jnz" when
detecting user mode and get rid of unnecessary jump as result.

Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Christia Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
  • Loading branch information
Alexander Gordeev authored and Vasily Gorbik committed Jul 5, 2021
1 parent fbbdfca commit e2c13d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/s390/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -555,15 +555,17 @@ ENTRY(mcck_int_handler)
jno .Lmcck_panic
4: ssm __LC_PGM_NEW_PSW # turn dat on, keep irqs off
tmhh %r8,0x0001 # interrupting from user ?
jnz .Lmcck_user
#if IS_ENABLED(CONFIG_KVM)
jnz .Lmcck_user
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,.Lmcck_stack
OUTSIDE %r9,.Lsie_entry,.Lsie_skip,5f
oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST
5: BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
SIEEXIT
#endif
j .Lmcck_stack
#else
jz .Lmcck_stack
#endif
.Lmcck_user:
BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP
.Lmcck_stack:
Expand Down

0 comments on commit e2c13d6

Please sign in to comment.