1. 21 6月, 2017 1 次提交
  2. 20 6月, 2017 1 次提交
    • T
      Merge branch 'clockevents/4.13' of... · e707eb76
      Thomas Gleixner 提交于
      Merge branch 'clockevents/4.13' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
      
      Pull clockevent changes from Daniel Lezcano:
      
       - Factored out moxart, aspeed, cortina drivers into a generic timer fttrm010.
         Take the opportunity to add the delay timer (Linus Walleij)
      
       - Saved / restored tcb atmel context at suspend/resume (Alexandre Belloni)
      
       - Added ast2500 compatible string and fixed aspeed2500 initialization (Daniel
         Lezcano)
      
       - Added clock names property for aspeed (Andrew Jeffery)
      
       - Renamed clocksource_of to timer_of (Daniel Lezcano)
      
       - Added a common timer init routine (Daniel Lezcano)
      e707eb76
  3. 14 6月, 2017 30 次提交
  4. 13 6月, 2017 2 次提交
    • T
      posix-timers: Handle relative posix-timers correctly · 67edab48
      Thomas Gleixner 提交于
      The recent rework of the posix timer internals broke the magic posix
      mechanism, which requires that relative timers are not affected by
      modifications of the underlying clock. That means relative CLOCK_REALTIME
      timers cannot use CLOCK_REALTIME, because that can be set and adjusted. The
      underlying hrtimer switches the clock for these timers to CLOCK_MONOTONIC.
      
      That still works, but reading the remaining time of such a timer has been
      broken in the rework. The old code used the hrtimer internals directly and
      avoided the posix clock callbacks. Now common_timer_get() uses the
      underlying kclock->timer_get() callback, which is still CLOCK_REALTIME
      based. So the remaining time of such a timer is calculated against the
      wrong time base.
      
      Handle it by switching the k_itimer->kclock pointer according to the
      resulting hrtimer mode. k_itimer->it_clock still contains CLOCK_REALTIME
      because the timer might be set with ABSTIME later and then it needs to
      switch back to the realtime posix clock implementation.
      
      Fixes: eae1c4ae ("posix-timers: Make use of cancel/arm callbacks")
      Reported-by: NAndrei Vagin <avagin@virtuozzo.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Link: http://lkml.kernel.org/r/20170609201156.GB21491@outlook.office365.com
      67edab48
    • T
      posix-timers: Zero out oldval itimerspec · 5c7a3a3d
      Thomas Gleixner 提交于
      The recent posix timer rework moved the clearing of the itimerspec to the
      real syscall implementation, but forgot that the kclock->timer_get() is
      used by timer_settime() as well. That results in an uninitialized variable
      and bogus values returned to user space.
      
      Add the missing memset to timer_settime().
      
      Fixes: eabdec04 ("posix-timers: Zero settings value in common code")
      Reported-by: NAndrei Vagin <avagin@virtuozzo.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Link: http://lkml.kernel.org/r/20170609201156.GB21491@outlook.office365.com
      5c7a3a3d
  5. 12 6月, 2017 6 次提交