lkml.org 
[lkml]   [2013]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 29/40] s390: Convert vtime to hotplug state machine
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/s390/kernel/vtime.c | 18 +++++-------------
include/linux/cpuhotplug.h | 1 +
2 files changed, 6 insertions(+), 13 deletions(-)

Index: linux-2.6/arch/s390/kernel/vtime.c
===================================================================
--- linux-2.6.orig/arch/s390/kernel/vtime.c
+++ linux-2.6/arch/s390/kernel/vtime.c
@@ -382,25 +382,17 @@ void __cpuinit init_cpu_vtimer(void)
set_vtimer(VTIMER_MAX_SLICE);
}

-static int __cpuinit s390_nohz_notify(struct notifier_block *self,
- unsigned long action, void *hcpu)
+static int __cpuinit s390_vtime_dying_cpu(unsigned int cpu)
{
- struct s390_idle_data *idle;
- long cpu = (long) hcpu;
+ struct s390_idle_data *idle = &per_cpu(s390_idle, cpu);

- idle = &per_cpu(s390_idle, cpu);
- switch (action & ~CPU_TASKS_FROZEN) {
- case CPU_DYING:
- idle->nohz_delay = 0;
- default:
- break;
- }
- return NOTIFY_OK;
+ idle->nohz_delay = 0;
+ return 0;
}

void __init vtime_init(void)
{
/* Enable cpu timer interrupts on the boot cpu. */
init_cpu_vtimer();
- cpu_notifier(s390_nohz_notify, 0);
+ cpuhp_setup_state(CPUHP_AP_S390_VTIME_DYING, NULL, s390_vtime_dying_cpu);
}
Index: linux-2.6/include/linux/cpuhotplug.h
===================================================================
--- linux-2.6.orig/include/linux/cpuhotplug.h
+++ linux-2.6/include/linux/cpuhotplug.h
@@ -27,6 +27,7 @@ enum cpuhp_states {
CPUHP_AP_ARM64_TIMER_STARTING,
CPUHP_AP_KVM_STARTING,
CPUHP_AP_NOTIFY_DYING,
+ CPUHP_AP_S390_VTIME_DYING,
CPUHP_AP_SCHED_MIGRATE_DYING,
CPUHP_AP_MAX,
CPUHP_TEARDOWN_CPU,



\
 
 \ /
  Last update: 2013-01-31 14:21    [W:0.224 / U:1.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site