1. 03 5月, 2011 2 次提交
  2. 29 4月, 2011 2 次提交
    • J
      timers: Remove delayed irqwork from alarmtimers implementation · 7068b7a1
      John Stultz 提交于
      Thomas asked about the delayed irq work in the alarmtimers code,
      and I realized that it was a legacy from when the alarmtimer base
      lock was a mutex (due to concerns that we'd be interacting with
      the RTC device, which is protected by mutexes).
      
      Since the alarmtimer base is now protected by a spinlock, we can
      simply execute alarmtimer functions directly from the hrtimer
      callback. Should any future alarmtimer functions sleep, they can
      simply manage scheduling any delayed work themselves.
      
      CC: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      7068b7a1
    • J
      timers: Improve alarmtimer comments and minor fixes · 180bf812
      John Stultz 提交于
      This patch addresses a number of minor comment improvements and
      other minor issues from Thomas' review of the alarmtimers code.
      
      CC: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      180bf812
  3. 27 4月, 2011 7 次提交
    • J
      timers: Posix interface for alarm-timers · 9a7adcf5
      John Stultz 提交于
      This patch exposes alarm-timers to userland via the posix clock
      and timers interface, using two new clockids: CLOCK_REALTIME_ALARM
      and CLOCK_BOOTTIME_ALARM. Both clockids behave identically to
      CLOCK_REALTIME and CLOCK_BOOTTIME, respectively, but timers
      set against the _ALARM suffixed clockids will wake the system if
      it is suspended.
      
      Some background can be found here:
      	https://lwn.net/Articles/429925/
      
      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
      
      While the in-kernel interface is pretty similar between
      alarm-timers and Android alarm driver, the user-space interface
      for the Android alarm driver is via ioctls to a new char device.
      As mentioned above, I've instead chosen to export this functionality
      via the posix interface, as it seemed a little simpler and avoids
      creating duplicate interfaces to things like CLOCK_REALTIME and
      CLOCK_MONOTONIC under alternate names (ie:ANDROID_ALARM_RTC and
      ANDROID_ALARM_SYSTEMTIME).
      
      The semantics of the Android alarm driver are different from what
      this posix interface provides. For instance, threads other then
      the thread waiting on the Android alarm driver are able to modify
      the alarm being waited on. Also this interface does not allow
      the same wakelock semantics that the Android driver provides
      (ie: kernel takes a wakelock on RTC alarm-interupt, and holds it
      through process wakeup, and while the process runs, until the
      process either closes the char device or calls back in to wait
      on a new alarm).
      
      One potential way to implement similar semantics may be via
      the timerfd infrastructure, but this needs more research.
      
      There may also need to be some sort of sysfs system level policy
      hooks that allow alarm timers to be disabled to keep them
      from firing at inappropriate times (ie: laptop in a well insulated
      bag, mid-flight).
      
      CC: Arve Hjønnevåg <arve@android.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      9a7adcf5
    • J
      timers: Introduce in-kernel alarm-timer interface · ff3ead96
      John Stultz 提交于
      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 <arve@android.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Alessandro Zummo <a.zummo@towertech.it>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      ff3ead96
    • J
      timers: Add rb_init_node() to allow for stack allocated rb nodes · 88d19cf3
      John Stultz 提交于
      In cases where a timerqueue_node or some structure that utilizes
      a timerqueue_node is allocated on the stack, gcc would give warnings
      caused by the timerqueue_init()'s calling RB_CLEAR_NODE, which
      self-references the nodes uninitialized data.
      
      The solution is to create an rb_init_node() function that zeros
      the rb_node structure out and then calls RB_CLEAR_NODE(), and
      then call the new init function from timerqueue_init().
      
      CC: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      88d19cf3
    • J
      time: Add timekeeping_inject_sleeptime · 304529b1
      John Stultz 提交于
      Some platforms cannot implement read_persistent_clock, as
      their RTC devices are only accessible when interrupts are enabled.
      This keeps them from being used by the timekeeping code on resume
      to measure the time in suspend.
      
      The RTC layer tries to work around this, by calling do_settimeofday
      on resume after irqs are reenabled to set the time properly. However,
      this only corrects CLOCK_REALTIME, and does not properly adjust
      the sleep time value. This causes btime in /proc/stat to be incorrect
      as well as making the new CLOCK_BOTTTIME inaccurate.
      
      This patch resolves the issue by introducing a new timekeeping hook
      to allow the RTC layer to inject the sleep time on resume.
      
      The code also checks to make sure that read_persistent_clock is
      nonfunctional before setting the sleep time, so that should the RTC's
      HCTOSYS option be configured in on a system that does support
      read_persistent_clock we will not increase the total_sleep_time twice.
      
      CC: Arve Hjønnevåg <arve@android.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      304529b1
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · 4175242c
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        amd64_edac: Erratum #637 workaround
        amd64_edac: Factor in CC6 save area
        amd64_edac: Remove node interleave warning
        EDAC: Remove debugging output in scrub rate handling
      4175242c
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog · 45dafe98
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
        watchdog: iTCO_wdt: TCO Watchdog patch for Intel Panther Point PCH
      45dafe98
    • L
      Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 · fc7b3ff1
      Linus Torvalds 提交于
      * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
        [S390] kvm-390: Let kernel exit SIE instruction on work
        [S390] dasd: check sense type in device change handler
        [S390] pfault: fix token handling
        [S390] qdio: reset error states immediately
        [S390] fix page table walk for changing page attributes
        [S390] prng: prevent access beyond end of stack
        [S390] dasd: fix race between open and offline
      fc7b3ff1
  4. 26 4月, 2011 25 次提交
  5. 24 4月, 2011 4 次提交