aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/cputime.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index f23961ada7fb..258ba88b7b50 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
188DECLARE_PER_CPU(struct s390_idle_data, s390_idle); 189DECLARE_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
202static 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 */