diff options
Diffstat (limited to 'arch/s390/kernel/entry64.S')
-rw-r--r-- | arch/s390/kernel/entry64.S | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 1983c22a8a99..349b7eeb348a 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -642,15 +642,11 @@ ext_skip: | |||
642 | * Load idle PSW. The second "half" of this function is in cleanup_idle. | 642 | * Load idle PSW. The second "half" of this function is in cleanup_idle. |
643 | */ | 643 | */ |
644 | ENTRY(psw_idle) | 644 | ENTRY(psw_idle) |
645 | stg %r4,__SF_EMPTY(%r15) | 645 | stg %r3,__SF_EMPTY(%r15) |
646 | larl %r1,psw_idle_lpsw+4 | 646 | larl %r1,psw_idle_lpsw+4 |
647 | stg %r1,__SF_EMPTY+8(%r15) | 647 | stg %r1,__SF_EMPTY+8(%r15) |
648 | larl %r1,.Lvtimer_max | 648 | STCK __CLOCK_IDLE_ENTER(%r2) |
649 | STCK __IDLE_ENTER(%r2) | 649 | stpt __TIMER_IDLE_ENTER(%r2) |
650 | ltr %r5,%r5 | ||
651 | stpt __VQ_IDLE_ENTER(%r3) | ||
652 | jz psw_idle_lpsw | ||
653 | spt 0(%r1) | ||
654 | psw_idle_lpsw: | 650 | psw_idle_lpsw: |
655 | lpswe __SF_EMPTY(%r15) | 651 | lpswe __SF_EMPTY(%r15) |
656 | br %r14 | 652 | br %r14 |
@@ -918,33 +914,28 @@ cleanup_io_restore_insn: | |||
918 | 914 | ||
919 | cleanup_idle: | 915 | cleanup_idle: |
920 | # copy interrupt clock & cpu timer | 916 | # copy interrupt clock & cpu timer |
921 | mvc __IDLE_EXIT(8,%r2),__LC_INT_CLOCK | 917 | mvc __CLOCK_IDLE_EXIT(8,%r2),__LC_INT_CLOCK |
922 | mvc __VQ_IDLE_EXIT(8,%r3),__LC_ASYNC_ENTER_TIMER | 918 | mvc __TIMER_IDLE_EXIT(8,%r2),__LC_ASYNC_ENTER_TIMER |
923 | cghi %r11,__LC_SAVE_AREA_ASYNC | 919 | cghi %r11,__LC_SAVE_AREA_ASYNC |
924 | je 0f | 920 | je 0f |
925 | mvc __IDLE_EXIT(8,%r2),__LC_MCCK_CLOCK | 921 | mvc __CLOCK_IDLE_EXIT(8,%r2),__LC_MCCK_CLOCK |
926 | mvc __VQ_IDLE_EXIT(8,%r3),__LC_MCCK_ENTER_TIMER | 922 | mvc __TIMER_IDLE_EXIT(8,%r2),__LC_MCCK_ENTER_TIMER |
927 | 0: # check if stck & stpt have been executed | 923 | 0: # check if stck & stpt have been executed |
928 | clg %r9,BASED(cleanup_idle_insn) | 924 | clg %r9,BASED(cleanup_idle_insn) |
929 | jhe 1f | 925 | jhe 1f |
930 | mvc __IDLE_ENTER(8,%r2),__IDLE_EXIT(%r2) | 926 | mvc __CLOCK_IDLE_ENTER(8,%r2),__CLOCK_IDLE_EXIT(%r2) |
931 | mvc __VQ_IDLE_ENTER(8,%r3),__VQ_IDLE_EXIT(%r3) | 927 | mvc __TIMER_IDLE_ENTER(8,%r2),__TIMER_IDLE_EXIT(%r2) |
932 | j 2f | 928 | 1: # account system time going idle |
933 | 1: # check if the cpu timer has been reprogrammed | ||
934 | ltr %r5,%r5 | ||
935 | jz 2f | ||
936 | spt __VQ_IDLE_ENTER(%r3) | ||
937 | 2: # account system time going idle | ||
938 | lg %r9,__LC_STEAL_TIMER | 929 | lg %r9,__LC_STEAL_TIMER |
939 | alg %r9,__IDLE_ENTER(%r2) | 930 | alg %r9,__CLOCK_IDLE_ENTER(%r2) |
940 | slg %r9,__LC_LAST_UPDATE_CLOCK | 931 | slg %r9,__LC_LAST_UPDATE_CLOCK |
941 | stg %r9,__LC_STEAL_TIMER | 932 | stg %r9,__LC_STEAL_TIMER |
942 | mvc __LC_LAST_UPDATE_CLOCK(8),__IDLE_EXIT(%r2) | 933 | mvc __LC_LAST_UPDATE_CLOCK(8),__CLOCK_IDLE_EXIT(%r2) |
943 | lg %r9,__LC_SYSTEM_TIMER | 934 | lg %r9,__LC_SYSTEM_TIMER |
944 | alg %r9,__LC_LAST_UPDATE_TIMER | 935 | alg %r9,__LC_LAST_UPDATE_TIMER |
945 | slg %r9,__VQ_IDLE_ENTER(%r3) | 936 | slg %r9,__TIMER_IDLE_ENTER(%r2) |
946 | stg %r9,__LC_SYSTEM_TIMER | 937 | stg %r9,__LC_SYSTEM_TIMER |
947 | mvc __LC_LAST_UPDATE_TIMER(8),__VQ_IDLE_EXIT(%r3) | 938 | mvc __LC_LAST_UPDATE_TIMER(8),__TIMER_IDLE_EXIT(%r2) |
948 | # prepare return psw | 939 | # prepare return psw |
949 | nihh %r8,0xfffd # clear wait state bit | 940 | nihh %r8,0xfffd # clear wait state bit |
950 | lg %r9,48(%r11) # return from psw_idle | 941 | lg %r9,48(%r11) # return from psw_idle |
@@ -960,8 +951,6 @@ cleanup_idle_insn: | |||
960 | .quad __critical_start | 951 | .quad __critical_start |
961 | .Lcritical_length: | 952 | .Lcritical_length: |
962 | .quad __critical_end - __critical_start | 953 | .quad __critical_end - __critical_start |
963 | .Lvtimer_max: | ||
964 | .quad 0x7fffffffffffffff | ||
965 | 954 | ||
966 | 955 | ||
967 | #if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE) | 956 | #if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE) |