1. 11 12月, 2010 5 次提交
    • J
      RTC: Rework RTC code to use timerqueue for events · 6610e089
      John Stultz 提交于
      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: NJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-4-git-send-email-john.stultz@linaro.org>
      Acked-by: NAlessandro Zummo <a.zummo@towertech.it>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      6610e089
    • J
      hrtimer: fix timerqueue conversion flub · b007c389
      John Stultz 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      b007c389
    • J
      hrtimers: Convert hrtimers to use timerlist infrastructure · 998adc3d
      John Stultz 提交于
      Converts the hrtimer code to use the new timerlist infrastructure
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-3-git-send-email-john.stultz@linaro.org>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      998adc3d
    • J
      timers: Fixup allmodconfig build issue · 9bb99b14
      John Stultz 提交于
      Adds missed EXPORT_SYMBOL lines that cause the following build
      failures with allmodconfig:
      ERROR: "timerqueue_add" [drivers/rtc/rtc-core.ko] undefined!
      ERROR: "timerqueue_getnext" [drivers/rtc/rtc-core.ko] undefined!
      ERROR: "timerqueue_del" [drivers/rtc/rtc-core.ko] undefined!
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Reported-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      9bb99b14
    • J
      timers: Rename timerlist infrastructure to timerqueue · 1f5a2479
      John Stultz 提交于
      Thomas pointed out a namespace collision between the new timerlist
      infrastructure I introduced and the existing timer_list.c
      
      So to avoid confusion, I've renamed the timerlist infrastructure
      to timerqueue.
      Reported-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      1f5a2479
  2. 03 12月, 2010 1 次提交
    • J
      timers: Introduce timerlist infrastructure. · 87de5ac7
      John Stultz 提交于
      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: NJohn Stultz <john.stultz@linaro.org>
      LKML Reference: <1290136329-18291-2-git-send-email-john.stultz@linaro.org>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Richard Cochran <richardcochran@gmail.com>
      87de5ac7
  3. 10 11月, 2010 1 次提交
  4. 22 10月, 2010 3 次提交
  5. 21 10月, 2010 6 次提交
  6. 10 9月, 2010 1 次提交
  7. 08 9月, 2010 23 次提交