summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/idle.c
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2024-04-30 16:29:59 +0200
committerAlexander Gordeev <agordeev@linux.ibm.com>2024-05-14 13:37:07 +0200
commitfa2ae4a377c0fbbcbcd4252842e702f7e4187170 (patch)
tree65c1314e568a499982b2f32377ea7ba8dd6cecde /arch/s390/kernel/idle.c
parents390/stackstrace: Detect vdso stack frames (diff)
downloadlinux-fa2ae4a377c0fbbcbcd4252842e702f7e4187170.tar.xz
linux-fa2ae4a377c0fbbcbcd4252842e702f7e4187170.zip
s390/idle: Rewrite psw_idle() in C
To ease maintenance and further enhancements, convert the psw_idle() function to C. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/idle.c')
-rw-r--r--arch/s390/kernel/idle.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c
index e7239aaf428b..af9c97c0ad73 100644
--- a/arch/s390/kernel/idle.c
+++ b/arch/s390/kernel/idle.c
@@ -57,9 +57,13 @@ void noinstr arch_cpu_idle(void)
psw_mask = PSW_KERNEL_BITS | PSW_MASK_WAIT |
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK;
clear_cpu_flag(CIF_NOHZ_DELAY);
-
- /* psw_idle() returns with interrupts disabled. */
- psw_idle(idle, psw_mask);
+ set_cpu_flag(CIF_ENABLED_WAIT);
+ if (smp_cpu_mtid)
+ stcctm(MT_DIAG, smp_cpu_mtid, (u64 *)&idle->mt_cycles_enter);
+ idle->clock_idle_enter = get_tod_clock_fast();
+ idle->timer_idle_enter = get_cpu_timer();
+ bpon();
+ __load_psw_mask(psw_mask);
}
static ssize_t show_idle_count(struct device *dev,