diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/cputime.h | 8 | ||||
-rw-r--r-- | arch/s390/kernel/s390_ext.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/vtime.c | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 24b1244aadb9..95f3561517c7 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
@@ -183,6 +183,7 @@ struct s390_idle_data { | |||
183 | unsigned long long idle_count; | 183 | unsigned long long idle_count; |
184 | unsigned long long idle_enter; | 184 | unsigned long long idle_enter; |
185 | unsigned long long idle_time; | 185 | unsigned long long idle_time; |
186 | int nohz_delay; | ||
186 | }; | 187 | }; |
187 | 188 | ||
188 | DECLARE_PER_CPU(struct s390_idle_data, s390_idle); | 189 | DECLARE_PER_CPU(struct s390_idle_data, s390_idle); |
@@ -198,4 +199,11 @@ static inline void s390_idle_check(void) | |||
198 | vtime_start_cpu(); | 199 | vtime_start_cpu(); |
199 | } | 200 | } |
200 | 201 | ||
202 | static inline int s390_nohz_delay(int cpu) | ||
203 | { | ||
204 | return per_cpu(s390_idle, cpu).nohz_delay != 0; | ||
205 | } | ||
206 | |||
207 | #define arch_needs_cpu(cpu) s390_nohz_delay(cpu) | ||
208 | |||
201 | #endif /* _S390_CPUTIME_H */ | 209 | #endif /* _S390_CPUTIME_H */ |
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c index 0de305b598ce..59618bcd99b7 100644 --- a/arch/s390/kernel/s390_ext.c +++ b/arch/s390/kernel/s390_ext.c | |||
@@ -126,6 +126,8 @@ void __irq_entry do_extint(struct pt_regs *regs, unsigned short code) | |||
126 | /* Serve timer interrupts first. */ | 126 | /* Serve timer interrupts first. */ |
127 | clock_comparator_work(); | 127 | clock_comparator_work(); |
128 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; | 128 | kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; |
129 | if (code != 0x1004) | ||
130 | __get_cpu_var(s390_idle).nohz_delay = 1; | ||
129 | index = ext_hash(code); | 131 | index = ext_hash(code); |
130 | for (p = ext_int_hash[index]; p; p = p->next) { | 132 | for (p = ext_int_hash[index]; p; p = p->next) { |
131 | if (likely(p->code == code)) | 133 | if (likely(p->code == code)) |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index c41bb0d416e1..b59a812a010e 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -167,6 +167,8 @@ void vtime_stop_cpu(void) | |||
167 | /* Wait for external, I/O or machine check interrupt. */ | 167 | /* Wait for external, I/O or machine check interrupt. */ |
168 | psw.mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT; | 168 | psw.mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT; |
169 | 169 | ||
170 | idle->nohz_delay = 0; | ||
171 | |||
170 | /* Check if the CPU timer needs to be reprogrammed. */ | 172 | /* Check if the CPU timer needs to be reprogrammed. */ |
171 | if (vq->do_spt) { | 173 | if (vq->do_spt) { |
172 | __u64 vmax = VTIMER_MAX_SLICE; | 174 | __u64 vmax = VTIMER_MAX_SLICE; |