hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/s390/kernel/idle.c
....@@ -14,6 +14,7 @@
1414 #include <linux/init.h>
1515 #include <linux/cpu.h>
1616 #include <linux/sched/cputime.h>
17
+#include <trace/events/power.h>
1718 #include <asm/nmi.h>
1819 #include <asm/smp.h>
1920 #include "entry.h"
....@@ -24,28 +25,27 @@
2425 {
2526 struct s390_idle_data *idle = this_cpu_ptr(&s390_idle);
2627 unsigned long long idle_time;
27
- unsigned long psw_mask;
28
+ unsigned long psw_mask, flags;
2829
29
- trace_hardirqs_on();
3030
3131 /* Wait for external, I/O or machine check interrupt. */
3232 psw_mask = PSW_KERNEL_BITS | PSW_MASK_WAIT | PSW_MASK_DAT |
3333 PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK;
3434 clear_cpu_flag(CIF_NOHZ_DELAY);
3535
36
+ raw_local_irq_save(flags);
3637 /* Call the assembler magic in entry.S */
3738 psw_idle(idle, psw_mask);
38
-
39
- trace_hardirqs_off();
39
+ raw_local_irq_restore(flags);
4040
4141 /* Account time spent with enabled wait psw loaded as idle time. */
42
- write_seqcount_begin(&idle->seqcount);
42
+ raw_write_seqcount_begin(&idle->seqcount);
4343 idle_time = idle->clock_idle_exit - idle->clock_idle_enter;
4444 idle->clock_idle_enter = idle->clock_idle_exit = 0ULL;
4545 idle->idle_time += idle_time;
4646 idle->idle_count++;
4747 account_idle_time(cputime_to_nsecs(idle_time));
48
- write_seqcount_end(&idle->seqcount);
48
+ raw_write_seqcount_end(&idle->seqcount);
4949 }
5050 NOKPROBE_SYMBOL(enabled_wait);
5151
....@@ -118,22 +118,16 @@
118118
119119 void arch_cpu_idle_enter(void)
120120 {
121
- local_mcck_disable();
122121 }
123122
124123 void arch_cpu_idle(void)
125124 {
126
- if (!test_cpu_flag(CIF_MCCK_PENDING))
127
- /* Halt the cpu and keep track of cpu time accounting. */
128
- enabled_wait();
129
- local_irq_enable();
125
+ enabled_wait();
126
+ raw_local_irq_enable();
130127 }
131128
132129 void arch_cpu_idle_exit(void)
133130 {
134
- local_mcck_enable();
135
- if (test_cpu_flag(CIF_MCCK_PENDING))
136
- s390_handle_mcck();
137131 }
138132
139133 void arch_cpu_idle_dead(void)