aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/vtime.c')
-rw-r--r--arch/s390/kernel/vtime.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 3479f1b0d4e0..c1e326cedea5 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -19,6 +19,7 @@
19#include <linux/kernel_stat.h> 19#include <linux/kernel_stat.h>
20#include <linux/rcupdate.h> 20#include <linux/rcupdate.h>
21#include <linux/posix-timers.h> 21#include <linux/posix-timers.h>
22#include <linux/cpu.h>
22 23
23#include <asm/s390_ext.h> 24#include <asm/s390_ext.h>
24#include <asm/timer.h> 25#include <asm/timer.h>
@@ -565,6 +566,23 @@ void init_cpu_vtimer(void)
565 __ctl_set_bit(0,10); 566 __ctl_set_bit(0,10);
566} 567}
567 568
569static int __cpuinit s390_nohz_notify(struct notifier_block *self,
570 unsigned long action, void *hcpu)
571{
572 struct s390_idle_data *idle;
573 long cpu = (long) hcpu;
574
575 idle = &per_cpu(s390_idle, cpu);
576 switch (action) {
577 case CPU_DYING:
578 case CPU_DYING_FROZEN:
579 idle->nohz_delay = 0;
580 default:
581 break;
582 }
583 return NOTIFY_OK;
584}
585
568void __init vtime_init(void) 586void __init vtime_init(void)
569{ 587{
570 /* request the cpu timer external interrupt */ 588 /* request the cpu timer external interrupt */
@@ -573,5 +591,6 @@ void __init vtime_init(void)
573 591
574 /* Enable cpu timer interrupts on the boot cpu. */ 592 /* Enable cpu timer interrupts on the boot cpu. */
575 init_cpu_vtimer(); 593 init_cpu_vtimer();
594 cpu_notifier(s390_nohz_notify, 0);
576} 595}
577 596