aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_idle.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 14:08:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 14:08:28 -0400
commit7fd56474db326f7a6df0e2a4e3a9600cc083ab9b (patch)
tree72611132105deedcde415e6f41c081fd784e31db /drivers/acpi/processor_idle.c
parent49d2953c72c64182ef2dcac64f6979c0b4e25db7 (diff)
parentdef747087e83aa5f6a71582cfa71e18341988688 (diff)
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Ingo Molnar: "The main changes in this cycle were: - clockevents state machine cleanups and enhancements (Viresh Kumar) - clockevents broadcast notifier horror to state machine conversion and related cleanups (Thomas Gleixner, Rafael J Wysocki) - clocksource and timekeeping core updates (John Stultz) - clocksource driver updates and fixes (Ben Dooks, Dmitry Osipenko, Hans de Goede, Laurent Pinchart, Maxime Ripard, Xunlei Pang) - y2038 fixes (Xunlei Pang, John Stultz) - NMI-safe ktime_get_raw_fast() and general refactoring of the clock code, in preparation to perf's per event clock ID support (Peter Zijlstra) - generic sched/clock fixes, optimizations and cleanups (Daniel Thompson) - clockevents cpu_down() race fix (Preeti U Murthy)" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (94 commits) timers/PM: Drop unnecessary braces from tick_freeze() timers/PM: Fix up tick_unfreeze() timekeeping: Get rid of stale comment clockevents: Cleanup dead cpu explicitely clockevents: Make tick handover explicit clockevents: Remove broadcast oneshot control leftovers sched/idle: Use explicit broadcast oneshot control function ARM: Tegra: Use explicit broadcast oneshot control function ARM: OMAP: Use explicit broadcast oneshot control function intel_idle: Use explicit broadcast oneshot control function ACPI/idle: Use explicit broadcast control function ACPI/PAD: Use explicit broadcast oneshot control function x86/amd/idle, clockevents: Use explicit broadcast oneshot control functions clockevents: Provide explicit broadcast oneshot control functions clockevents: Remove the broadcast control leftovers ARM: OMAP: Use explicit broadcast control function intel_idle: Use explicit broadcast control function cpuidle: Use explicit broadcast control function ACPI/processor: Use explicit broadcast control function ACPI/PAD: Use explicit broadcast control function ...
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r--drivers/acpi/processor_idle.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f98db0b50551..39e0c8e36244 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -32,7 +32,7 @@
32#include <linux/acpi.h> 32#include <linux/acpi.h>
33#include <linux/dmi.h> 33#include <linux/dmi.h>
34#include <linux/sched.h> /* need_resched() */ 34#include <linux/sched.h> /* need_resched() */
35#include <linux/clockchips.h> 35#include <linux/tick.h>
36#include <linux/cpuidle.h> 36#include <linux/cpuidle.h>
37#include <linux/syscore_ops.h> 37#include <linux/syscore_ops.h>
38#include <acpi/processor.h> 38#include <acpi/processor.h>
@@ -157,12 +157,11 @@ static void lapic_timer_check_state(int state, struct acpi_processor *pr,
157static void __lapic_timer_propagate_broadcast(void *arg) 157static void __lapic_timer_propagate_broadcast(void *arg)
158{ 158{
159 struct acpi_processor *pr = (struct acpi_processor *) arg; 159 struct acpi_processor *pr = (struct acpi_processor *) arg;
160 unsigned long reason;
161 160
162 reason = pr->power.timer_broadcast_on_state < INT_MAX ? 161 if (pr->power.timer_broadcast_on_state < INT_MAX)
163 CLOCK_EVT_NOTIFY_BROADCAST_ON : CLOCK_EVT_NOTIFY_BROADCAST_OFF; 162 tick_broadcast_enable();
164 163 else
165 clockevents_notify(reason, &pr->id); 164 tick_broadcast_disable();
166} 165}
167 166
168static void lapic_timer_propagate_broadcast(struct acpi_processor *pr) 167static void lapic_timer_propagate_broadcast(struct acpi_processor *pr)
@@ -179,11 +178,10 @@ static void lapic_timer_state_broadcast(struct acpi_processor *pr,
179 int state = cx - pr->power.states; 178 int state = cx - pr->power.states;
180 179
181 if (state >= pr->power.timer_broadcast_on_state) { 180 if (state >= pr->power.timer_broadcast_on_state) {
182 unsigned long reason; 181 if (broadcast)
183 182 tick_broadcast_enter();
184 reason = broadcast ? CLOCK_EVT_NOTIFY_BROADCAST_ENTER : 183 else
185 CLOCK_EVT_NOTIFY_BROADCAST_EXIT; 184 tick_broadcast_exit();
186 clockevents_notify(reason, &pr->id);
187 } 185 }
188} 186}
189 187