linux-stable/kernel/time
John Stultz dae373be9f alarmtimer: Use hrtimer per-alarm instead of per-base
Arve Hjønnevåg reported numerous crashes from the
"BUG_ON(timer->state != HRTIMER_STATE_CALLBACK)" check
in __run_hrtimer after it called alarmtimer_fired.

It ends up the alarmtimer code was not properly handling
possible failures of hrtimer_try_to_cancel, and because
these faulres occur when the underlying base hrtimer is
being run, this limits the ability to properly handle
modifications to any alarmtimers on that base.

Because much of the logic duplicates the hrtimer logic,
it seems that we might as well have a per-alarmtimer
hrtimer, and avoid the extra complextity of trying to
multiplex many alarmtimers off of one hrtimer.

Thus this patch moves the hrtimer to the alarm structure
and simplifies the management logic.

Changelog:
v2:
* Includes a fix for double alarm_start calls found by
  Arve

Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@android.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Arve Hjønnevåg <arve@android.com>
Tested-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2012-09-24 12:38:02 -04:00
..
alarmtimer.c alarmtimer: Use hrtimer per-alarm instead of per-base 2012-09-24 12:38:02 -04:00
clockevents.c clockevents: Make clockevents_config() a global symbol 2012-05-25 01:44:51 +02:00
clocksource.c kernel-time: fix s/then/than/ spelling errors 2012-03-23 16:49:21 -07:00
jiffies.c time/jiffies: Rename ACTHZ to SHIFTED_HZ 2012-07-31 17:09:12 +02:00
Kconfig timers: Fixup the Kconfig consolidation fallout 2012-05-21 23:43:46 +02:00
Makefile timers: Introduce in-kernel alarm-timer interface 2011-04-26 14:01:44 -07:00
ntp.c time/jiffies: Rename ACTHZ to SHIFTED_HZ 2012-07-31 17:09:12 +02:00
posix-clock.c kernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure 2011-10-31 19:30:05 -04:00
tick-broadcast.c tick: Fix the spurious broadcast timer ticks after resume 2012-04-19 21:27:50 +02:00
tick-common.c clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-internal.h clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-oneshot.c clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-sched.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-07-22 11:35:46 -07:00
timecompare.c time: Use ARRAY_SIZE macro in timecompare.c 2010-10-21 17:30:06 +02:00
timeconv.c time: add function to convert between calendar time and broken-down time for universal use 2009-09-24 07:20:56 -07:00
timekeeping.c time: Fix timeekeping_get_ns overflow on 32bit systems 2012-09-13 17:39:14 +02:00
timer_list.c nohz: Rename ts->idle_tick to ts->last_tick 2012-06-11 20:07:17 +02:00
timer_stats.c locking, timer_stats: Annotate table_lock as raw 2011-09-13 11:12:00 +02:00