1. 23 5月, 2015 2 次提交
  2. 19 5月, 2015 4 次提交
    • V
      clockevents: Stop unused clockevent devices · d2540875
      Viresh Kumar 提交于
      To avoid getting spurious interrupts on a tickless CPU, clockevent
      device can now be stopped by switching to ONESHOT_STOPPED state.
      
      The natural place for handling this transition is tick_program_event().
      
      On 'expires == KTIME_MAX', we skip programming the event and so we need
      to fix such call sites as well, to always call tick_program_event()
      irrespective of the expires value.
      
      Once the clockevent device is required again, check if it was earlier
      put into ONESHOT_STOPPED state. If yes, switch its state to ONESHOT
      before programming its event.
      
      To make sure we haven't missed any corner case, add a WARN() for the
      case where we try to reprogram clockevent device while we aren't
      configured in ONESHOT_STOPPED state.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Cc: linaro-kernel@lists.linaro.org
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Kevin Hilman <khilman@linaro.org>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/5146b07be7f0bc497e0ebae036590ec2fa73e540.1428031396.git.viresh.kumar@linaro.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      d2540875
    • V
      clockevents: Introduce CLOCK_EVT_STATE_ONESHOT_STOPPED state · 8fff52fd
      Viresh Kumar 提交于
      When no timers/hrtimers are pending, the expiry time is set to a
      special value: 'KTIME_MAX'. This normally happens with
      NO_HZ_{IDLE|FULL} in both LOWRES/HIGHRES modes.
      
      When 'expiry == KTIME_MAX', we either cancel the 'tick-sched' hrtimer
      (NOHZ_MODE_HIGHRES) or skip reprogramming clockevent device
      (NOHZ_MODE_LOWRES).  But, the clockevent device is already
      reprogrammed from the tick-handler for next tick.
      
      As the clock event device is programmed in ONESHOT mode it will at
      least fire one more time (unnecessarily). Timers on few
      implementations (like arm_arch_timer, etc.) only support PERIODIC mode
      and their drivers emulate ONESHOT over that. Which means that on these
      platforms we will get spurious interrupts periodically (at last
      programmed interval rate, normally tick rate).
      
      In order to avoid spurious interrupts, the clockevent device should be
      stopped or its interrupts should be masked.
      
      A simple (yet hacky) solution to get this fixed could be: update
      hrtimer_force_reprogram() to always reprogram clockevent device and
      update clockevent drivers to STOP generating events (or delay it to
      max time) when 'expires' is set to KTIME_MAX. But the drawback here is
      that every clockevent driver has to be hacked for this particular case
      and its very easy for new ones to miss this.
      
      However, Thomas suggested to add an optional state ONESHOT_STOPPED to
      solve this problem: lkml.org/lkml/2014/5/9/508.
      
      This patch adds support for ONESHOT_STOPPED state in clockevents
      core. It will only be available to drivers that implement the
      state-specific callbacks instead of the legacy ->set_mode() callback.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: NPreeti U. Murthy <preeti@linux.vnet.ibm.com>
      Cc: linaro-kernel@lists.linaro.org
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Kevin Hilman <khilman@linaro.org>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/b8b383a03ac07b13312c16850b5106b82e4245b5.1428031396.git.viresh.kumar@linaro.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      8fff52fd
    • N
      time: Refactor msecs_to_jiffies · ca42aaf0
      Nicholas Mc Guire 提交于
      Refactor the msecs_to_jiffies conditional code part in time.c and 
      jiffies.h putting it into conditional functions rather than #ifdefs
      to improve readability.
      
      [ tglx: Verified that there is no binary code change ]
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Joe Perches <joe@perches.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Andrew Hunter <ahh@google.com>
      Cc: Paul Turner <pjt@google.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Link: http://lkml.kernel.org/r/1431951554-5563-2-git-send-email-hofrat@osadl.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      ca42aaf0
    • N
      time: Move timeconst.h into include/generated · 0a227985
      Nicholas Mc Guire 提交于
      kernel/time/timeconst.h is moved to include/generated/ and generated 
      by the top level Kbuild. This allows using timeconst.h in an earlier
      build stage.
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Joe Perches <joe@perches.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Andrew Hunter <ahh@google.com>
      Cc: Paul Turner <pjt@google.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Link: http://lkml.kernel.org/r/1431951554-5563-1-git-send-email-hofrat@osadl.orgSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      0a227985
  3. 07 5月, 2015 1 次提交
  4. 05 5月, 2015 5 次提交
  5. 25 4月, 2015 1 次提交
  6. 22 4月, 2015 27 次提交