30 May, 2013

1 commit

  • Add functions needed for hooking up alarmtimer to timerfd:

    * alarm_restart: Similar to hrtimer_restart, restart an alarmtimer after
    the expires time has already been updated (as with alarm_forward).

    * alarm_forward_now: Similar to hrtimer_forward_now, move the expires
    time forward to an interval from the current time of the associated clock.

    * alarm_start_relative: Start an alarmtimer with an expires time relative to
    the current time of the associated clock.

    * alarm_expires_remaining: Similar to hrtimer_expires_remaining, return the
    amount of time remaining until alarm expiry.

    Signed-off-by: Todd Poynor
    Signed-off-by: John Stultz

    Todd Poynor
     

25 Sep, 2012

2 commits

  • No one is using these alarmtimer state helpers, so yank them.

    Cc: Arve Hjønnevåg
    Cc: Colin Cross
    Cc: Thomas Gleixner
    Signed-off-by: John Stultz

    John Stultz
     
  • 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
    Cc: Colin Cross
    Cc: Thomas Gleixner
    Reported-by: Arve Hjønnevåg
    Tested-by: Arve Hjønnevåg
    Signed-off-by: John Stultz

    John Stultz
     

21 Apr, 2012

1 commit

  • The Android alarm interface provides a settime call that sets both
    the alarmtimer RTC device and CLOCK_REALTIME to the same value.

    Since there may be multiple rtc devices, provide a hook to access the
    one the alarmtimer infrastructure is using.

    CC: Colin Cross
    CC: Thomas Gleixner
    CC: Android Kernel Team
    Signed-off-by: John Stultz
    Signed-off-by: Greg Kroah-Hartman

    John Stultz
     

11 Aug, 2011

5 commits


29 Apr, 2011

1 commit


27 Apr, 2011

1 commit

  • This provides the in kernel interface and infrastructure for
    alarm-timers.

    Alarm-timers are a hybrid style timer, similar to hrtimers,
    but when the system is suspended, the RTC device is set to
    fire and wake the system for when the soonest alarm-timer
    expires.

    The concept for Alarm-timers was inspired by the Android Alarm
    driver (by Arve Hjønnevåg) found in the Android kernel tree.

    See: http://android.git.kernel.org/?p=kernel/common.git;a=blob;f=drivers/rtc/alarm.c;h=1250edfbdf3302f5e4ea6194847c6ef4bb7beb1c;hb=android-2.6.36

    This in-kernel interface should be fairly compatible with the
    Android alarm driver in-kernel interface, but has the advantage
    of utilizing the new RTC timerqueue code instead of doing direct
    RTC manipulation.

    CC: Arve Hjønnevåg
    CC: Thomas Gleixner
    CC: Alessandro Zummo
    Acked-by: Arnd Bergmann
    Signed-off-by: John Stultz

    John Stultz