1. 24 Jul, 2009 3 commits
    • Thomas Gleixner's avatar
      timekeeping: Move ktime_get() functions to timekeeping.c · c1554e11
      Thomas Gleixner authored
      The ktime_get() functions for GENERIC_TIME=n are still located in
      hrtimer.c. Move them to time/timekeeping.c where they belong.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c1554e11
    • Martin Schwidefsky's avatar
      timekeeping: optimized ktime_get[_ts] for GENERIC_TIME=y · 9175f920
      Martin Schwidefsky authored
      The generic ktime_get function defined in kernel/hrtimer.c is suboptimial
      for GENERIC_TIME=y:
      
       0)               |  ktime_get() {
       0)               |    ktime_get_ts() {
       0)               |      getnstimeofday() {
       0)               |        read_tod_clock() {
       0)   0.601 us    |        }
       0)   1.938 us    |      }
       0)               |      set_normalized_timespec() {
       0)   0.602 us    |      }
       0)   4.375 us    |    }
       0)   5.523 us    |  }
      
      Overall there are two read_seqbegin/read_seqretry loops and a lot of
      unnecessary struct timespec calculations. ktime_get returns a nano second
      value which is the sum of xtime, wall_to_monotonic and the nano second
      delta from the clock source.
      
      ktime_get can be optimized for GENERIC_TIME=y. The new version only calls
      clocksource_read:
      
       0)               |  ktime_get() {
       0)               |    read_tod_clock() {
       0)   0.610 us    |    }
       0)   1.977 us    |  }
      
      It uses a single read_seqbegin/readseqretry loop and just adds everthing
      to a nano second value.
      
      ktime_get_ts is optimized in a similar fashion.
      
      [ tglx: added WARN_ON(timekeeping_suspended) as in getnstimeofday() ]
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Acked-by: default avatarjohn stultz <johnstul@us.ibm.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      9175f920
    • Thomas Gleixner's avatar
      x86: geode: Mark mfgpt irq IRQF_TIMER to prevent resume failure · c6bfec32
      Thomas Gleixner authored
      Timer interrupts are excluded from being disabled during suspend. The
      clock events code manages the disabling of clock events on its own
      because the timer interrupt needs to be functional before the resume
      code reenables the device interrupts.
      
      The mfgpt timer request its interrupt without setting the IRQF_TIMER
      flag so suspend_device_irqs() disables it as well which results in a
      fatal resume failure.
      
      Adding IRQF_TIMER to the interupt flags when requesting the mrgpt
      timer interrupt solves the problem.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c6bfec32
  2. 23 Jul, 2009 1 commit
  3. 22 Jul, 2009 36 commits