diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-10-17 03:59:47 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@apollo.(none)> | 2008-10-17 12:13:38 -0400 |
commit | 719254faa17ffedc87ba0fadb9b34e535c9758d5 (patch) | |
tree | 6afe1e9f2175aa5394cf6e0fc7c84afef0be3e9b /kernel | |
parent | 2e532d68a2b3e2aa6b19731501222069735c741c (diff) |
NOHZ: unify the nohz function calls in irq_enter()
We have two separate nohz function calls in irq_enter() for no good
reason. Just call a single NOHZ function from irq_enter() and call
the bits in the tick code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/softirq.c | 10 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 13 |
2 files changed, 15 insertions, 8 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 37d67aa2d56f..d410014279e7 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -265,16 +265,12 @@ asmlinkage void do_softirq(void) | |||
265 | */ | 265 | */ |
266 | void irq_enter(void) | 266 | void irq_enter(void) |
267 | { | 267 | { |
268 | #ifdef CONFIG_NO_HZ | ||
269 | int cpu = smp_processor_id(); | 268 | int cpu = smp_processor_id(); |
269 | |||
270 | if (idle_cpu(cpu) && !in_interrupt()) | 270 | if (idle_cpu(cpu) && !in_interrupt()) |
271 | tick_nohz_stop_idle(cpu); | 271 | tick_check_idle(cpu); |
272 | #endif | 272 | |
273 | __irq_enter(); | 273 | __irq_enter(); |
274 | #ifdef CONFIG_NO_HZ | ||
275 | if (idle_cpu(cpu)) | ||
276 | tick_nohz_update_jiffies(); | ||
277 | #endif | ||
278 | } | 274 | } |
279 | 275 | ||
280 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED | 276 | #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index b711ffcb106c..fdcf3f93bb8d 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -155,7 +155,7 @@ void tick_nohz_update_jiffies(void) | |||
155 | touch_softlockup_watchdog(); | 155 | touch_softlockup_watchdog(); |
156 | } | 156 | } |
157 | 157 | ||
158 | void tick_nohz_stop_idle(int cpu) | 158 | static void tick_nohz_stop_idle(int cpu) |
159 | { | 159 | { |
160 | struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); | 160 | struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); |
161 | 161 | ||
@@ -559,6 +559,17 @@ static inline void tick_nohz_switch_to_nohz(void) { } | |||
559 | #endif /* NO_HZ */ | 559 | #endif /* NO_HZ */ |
560 | 560 | ||
561 | /* | 561 | /* |
562 | * Called from irq_enter to notify about the possible interruption of idle() | ||
563 | */ | ||
564 | void tick_check_idle(int cpu) | ||
565 | { | ||
566 | #ifdef CONFIG_NO_HZ | ||
567 | tick_nohz_stop_idle(cpu); | ||
568 | tick_nohz_update_jiffies(); | ||
569 | #endif | ||
570 | } | ||
571 | |||
572 | /* | ||
562 | * High resolution timer specific code | 573 | * High resolution timer specific code |
563 | */ | 574 | */ |
564 | #ifdef CONFIG_HIGH_RES_TIMERS | 575 | #ifdef CONFIG_HIGH_RES_TIMERS |