.. | .. |
---|
14 | 14 | #include <linux/init.h> |
---|
15 | 15 | #include <linux/cpu.h> |
---|
16 | 16 | #include <linux/sched/cputime.h> |
---|
| 17 | +#include <trace/events/power.h> |
---|
17 | 18 | #include <asm/nmi.h> |
---|
18 | 19 | #include <asm/smp.h> |
---|
19 | 20 | #include "entry.h" |
---|
.. | .. |
---|
24 | 25 | { |
---|
25 | 26 | struct s390_idle_data *idle = this_cpu_ptr(&s390_idle); |
---|
26 | 27 | unsigned long long idle_time; |
---|
27 | | - unsigned long psw_mask; |
---|
| 28 | + unsigned long psw_mask, flags; |
---|
28 | 29 | |
---|
29 | | - trace_hardirqs_on(); |
---|
30 | 30 | |
---|
31 | 31 | /* Wait for external, I/O or machine check interrupt. */ |
---|
32 | 32 | psw_mask = PSW_KERNEL_BITS | PSW_MASK_WAIT | PSW_MASK_DAT | |
---|
33 | 33 | PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK; |
---|
34 | 34 | clear_cpu_flag(CIF_NOHZ_DELAY); |
---|
35 | 35 | |
---|
| 36 | + raw_local_irq_save(flags); |
---|
36 | 37 | /* Call the assembler magic in entry.S */ |
---|
37 | 38 | psw_idle(idle, psw_mask); |
---|
38 | | - |
---|
39 | | - trace_hardirqs_off(); |
---|
| 39 | + raw_local_irq_restore(flags); |
---|
40 | 40 | |
---|
41 | 41 | /* Account time spent with enabled wait psw loaded as idle time. */ |
---|
42 | | - write_seqcount_begin(&idle->seqcount); |
---|
| 42 | + raw_write_seqcount_begin(&idle->seqcount); |
---|
43 | 43 | idle_time = idle->clock_idle_exit - idle->clock_idle_enter; |
---|
44 | 44 | idle->clock_idle_enter = idle->clock_idle_exit = 0ULL; |
---|
45 | 45 | idle->idle_time += idle_time; |
---|
46 | 46 | idle->idle_count++; |
---|
47 | 47 | account_idle_time(cputime_to_nsecs(idle_time)); |
---|
48 | | - write_seqcount_end(&idle->seqcount); |
---|
| 48 | + raw_write_seqcount_end(&idle->seqcount); |
---|
49 | 49 | } |
---|
50 | 50 | NOKPROBE_SYMBOL(enabled_wait); |
---|
51 | 51 | |
---|
.. | .. |
---|
118 | 118 | |
---|
119 | 119 | void arch_cpu_idle_enter(void) |
---|
120 | 120 | { |
---|
121 | | - local_mcck_disable(); |
---|
122 | 121 | } |
---|
123 | 122 | |
---|
124 | 123 | void arch_cpu_idle(void) |
---|
125 | 124 | { |
---|
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(); |
---|
130 | 127 | } |
---|
131 | 128 | |
---|
132 | 129 | void arch_cpu_idle_exit(void) |
---|
133 | 130 | { |
---|
134 | | - local_mcck_enable(); |
---|
135 | | - if (test_cpu_flag(CIF_MCCK_PENDING)) |
---|
136 | | - s390_handle_mcck(); |
---|
137 | 131 | } |
---|
138 | 132 | |
---|
139 | 133 | void arch_cpu_idle_dead(void) |
---|