1. 11 Dec, 2010 3 commits
    • John Stultz's avatar
      RTC: Remove UIE emulation · 042620a0
      John Stultz authored
      Since we provide UIE interrupts via a rtc_timer, the old
      emulation code can be removed.
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-5-git-send-email-john.stultz@linaro.org>
      Acked-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      042620a0
    • John Stultz's avatar
      RTC: Rework RTC code to use timerqueue for events · 6610e089
      John Stultz authored
      This patch reworks a large portion of the generic RTC code
      to in-effect virtualize the rtc interrupt code.
      
      The current RTC interface is very much a raw hardware interface.
      Via the proc, /dev/, or sysfs interfaces, applciations can set
      the hardware to trigger interrupts in one of three modes:
      
      AIE: Alarm interrupt
      UIE: Update interrupt (ie: once per second)
      PIE: Periodic interrupt (sub-second irqs)
      
      The problem with this interface is that it limits the RTC hardware
      so it can only be used by one application at a time.
      
      The purpose of this patch is to extend the RTC code so that we can
      multiplex multiple applications event needs onto a single RTC device.
      This is done by utilizing the timerqueue infrastructure to manage
      a list of events, which cause the RTC hardware to be programmed
      to fire an interrupt for the next event in the list.
      
      In order to preserve the functionality of the exsting proc,/dev/ and
      sysfs interfaces, we emulate the different interrupt modes as follows:
      
      AIE: We create a rtc_timer dedicated to AIE mode interrupts. There is
      only one per device, so we don't change existing interface semantics.
      
      UIE: Again, a dedicated rtc_timer, set for periodic mode, is used
      to emulate UIE interrupts. Again, only one per device.
      
      PIE: Since PIE mode interrupts fire faster then the RTC's clock read
      granularity, we emulate PIE mode interrupts using a hrtimer. Again,
      one per device.
      
      With this patch, the rtctest.c application in Documentation/rtc.txt
      passes fine on x86 hardware. However, there may very well still be
      bugs, so greatly I'd appreciate any feedback or testing!
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-4-git-send-email-john.stultz@linaro.org>
      Acked-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      6610e089
    • John Stultz's avatar
      hrtimer: fix timerqueue conversion flub · b007c389
      John Stultz authored
      In converting the hrtimers to timerqueue, I missed
      a spot in hrtimer_run_queues where we loop running
      timers. We end up not pulling the new next value out
      and instead just use the last next value, causing
      boot time hangs in some cases.
      
      The proper fix is to pull timerqueue_getnext each iteration
      instead of using a local next value.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      b007c389
  2. 10 Dec, 2010 3 commits
  3. 03 Dec, 2010 1 commit
    • John Stultz's avatar
      timers: Introduce timerlist infrastructure. · 87de5ac7
      John Stultz authored
      The timerlist infrastructure is a thin layer over the rbtree
      code that implements a simple list of timers sorted by an
      expires value, and a getnext function that provides a pointer
      to the earliest timer.
      
      This infrastructure allows drivers and other kernel infrastructure
      to easily implement timers without duplicating code.
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-2-git-send-email-john.stultz@linaro.org>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      87de5ac7
  4. 10 Nov, 2010 1 commit
  5. 22 Oct, 2010 3 commits
  6. 21 Oct, 2010 6 commits
  7. 09 Sep, 2010 1 commit
  8. 07 Sep, 2010 22 commits