1. 20 4月, 2017 2 次提交
  2. 19 4月, 2017 5 次提交
  3. 15 4月, 2017 5 次提交
    • N
      clockevents/drivers/atlas7: Set ->min_delta_ticks and ->max_delta_ticks · 547733c5
      Nicolai Stange 提交于
      In preparation for making the clockevents core NTP correction aware,
      all clockevent device drivers must set ->min_delta_ticks and
      ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
      clockevent device's rate is going to change dynamically and thus, the
      ratio of ns to ticks ceases to stay invariant.
      
      Make the timer-atlas7 clockevent driver initialize these fields properly.
      
      This patch alone doesn't introduce any change in functionality as the
      clockevents core still looks exclusively at the (untouched) ->min_delta_ns
      and ->max_delta_ns. As soon as this has changed, a followup patch will
      purge the initialization of ->min_delta_ns and ->max_delta_ns from this
      driver.
      
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Barry Song <baohua@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      547733c5
    • N
      clockevents/drivers/sh_cmt: Set ->min_delta_ticks and ->max_delta_ticks · bb2e94ac
      Nicolai Stange 提交于
      In preparation for making the clockevents core NTP correction aware,
      all clockevent device drivers must set ->min_delta_ticks and
      ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
      clockevent device's rate is going to change dynamically and thus, the
      ratio of ns to ticks ceases to stay invariant.
      
      Make the sh_cmt clockevent driver initialize these fields properly.
      
      This patch alone doesn't introduce any change in functionality as the
      clockevents core still looks exclusively at the (untouched) ->min_delta_ns
      and ->max_delta_ns. As soon as this has changed, a followup patch will
      purge the initialization of ->min_delta_ns and ->max_delta_ns from this
      driver.
      
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      bb2e94ac
    • N
      x86/numachip timer: Set ->min_delta_ticks and ->max_delta_ticks · 6cf57ae8
      Nicolai Stange 提交于
      In preparation for making the clockevents core NTP correction aware,
      all clockevent device drivers must set ->min_delta_ticks and
      ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
      clockevent device's rate is going to change dynamically and thus, the
      ratio of ns to ticks ceases to stay invariant.
      
      Make the numachip clockevent driver initialize these fields properly.
      
      This patch alone doesn't introduce any change in functionality as the
      clockevents core still looks exclusively at the (untouched) ->min_delta_ns
      and ->max_delta_ns. As soon as this has changed, a followup patch will
      purge the initialization of ->min_delta_ns and ->max_delta_ns from this
      driver.
      
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      6cf57ae8
    • N
      clockevents/drivers/metag: Set ->min_delta_ticks and ->max_delta_ticks · c7438ba1
      Nicolai Stange 提交于
      In preparation for making the clockevents core NTP correction aware,
      all clockevent device drivers must set ->min_delta_ticks and
      ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
      clockevent device's rate is going to change dynamically and thus, the
      ratio of ns to ticks ceases to stay invariant.
      
      Make the metag_generic clockevent driver initialize these fields properly.
      
      This patch alone doesn't introduce any change in functionality as the
      clockevents core still looks exclusively at the (untouched) ->min_delta_ns
      and ->max_delta_ns. As soon as this has changed, a followup patch will
      purge the initialization of ->min_delta_ns and ->max_delta_ns from this
      driver.
      
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: James Hogan <james.hogan@imgtec.com>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      c7438ba1
    • N
      clockevents/drivers/dw_apb: Set ->min_delta_ticks and ->max_delta_ticks · 8317b53f
      Nicolai Stange 提交于
      In preparation for making the clockevents core NTP correction aware,
      all clockevent device drivers must set ->min_delta_ticks and
      ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
      clockevent device's rate is going to change dynamically and thus, the
      ratio of ns to ticks ceases to stay invariant.
      
      Make the dw_apb clockevent driver initialize these fields properly.
      
      This patch alone doesn't introduce any change in functionality as the
      clockevents core still looks exclusively at the (untouched) ->min_delta_ns
      and ->max_delta_ns. As soon as this has changed, a followup patch will
      purge the initialization of ->min_delta_ns and ->max_delta_ns from this
      driver.
      
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      8317b53f
  4. 10 4月, 2017 6 次提交
  5. 07 4月, 2017 18 次提交
  6. 24 3月, 2017 4 次提交
    • N
      clocksource: h8300_timer8: Don't reset rate in ->set_state_oneshot() · a17e0178
      Nicolai Stange 提交于
      With the upcoming NTP correction related rate adjustments to be implemented
      in the clockevents core, the latter needs to get informed about every rate
      change of a clockevent device made after its registration.
      
      Currently, h8300_timer8 violates this requirement in that it registers its
      clockevent device with the correct rate, but resets its ->mult and ->rate
      values in timer8_clock_event_start(), called from its ->set_state_oneshot()
      function.
      
      It seems like
        commit 4633f4ca ("clocksource/drivers/h8300: Cleanup startup and
                              remove module code."),
      which introduced the rate initialization at registration, missed to remove
      the manual setting of ->mult and ->shift from timer8_clock_event_start().
      
      Purge the setting of ->mult, ->shift, ->min_delta_ns and ->max_delta_ns
      from timer8_clock_event_start().
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      a17e0178
    • N
      clocksource: em_sti: Compute rate before registration · 4e53aa2f
      Nicolai Stange 提交于
      With the upcoming NTP correction related rate adjustments to be implemented
      in the clockevents core, the latter needs to get informed about every rate
      change of a clockevent device made after its registration.
      
      Currently, em_sti violates this requirement in that it registers its
      clockevent device with a dummy rate and sets its final rate through
      clockevents_config() called from its ->set_state_oneshot().
      
      This patch moves the setting of the clockevent device's rate to its
      registration.
      
      I checked all current em_sti users in arch/arm/mach-shmobile and right now,
      none of them changes any rate in any clock tree relevant to em_sti after
      their respective time_init(). Since all em_sti instances are created after
      time_init(), none of them should ever observe any clock rate changes.
      
      - Determine the ->rate value in em_sti_probe() at device probing rather
        than at first usage.
      - Set the clockevent device's rate at its registration.
      - Although not strictly necessary for the upcoming clockevent core changes,
        set the clocksource's rate at its registration for consistency.
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      4e53aa2f
    • N
      clocksource: em_sti: Split clock prepare and enable steps · 3814ae09
      Nicolai Stange 提交于
      Currently, the em_sti driver prepares and enables the needed clock in
      em_sti_enable(), potentially called through its clockevent device's
      ->set_state_oneshot().
      
      However, the clk_prepare() step may sleep whereas tick_program_event() and
      thus, ->set_state_oneshot(), can be called in atomic context.
      
      Split the clk_prepare_enable() in em_sti_enable() into two steps:
      - prepare the clock at device probing via clk_prepare()
      - and enable it in em_sti_enable() via clk_enable().
      Slightly reorder resource initialization in em_sti_probe() in order to
      facilitate error handling in later patches.
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      3814ae09
    • N
      clocksource: sh_tmu: Compute rate before registration again · c3c0a20d
      Nicolai Stange 提交于
      With the upcoming NTP correction related rate adjustments to be implemented
      in the clockevents core, the latter needs to get informed about every rate
      change of a clockevent device made after its registration.
      
      Currently, sh_tmu violates this requirement in that it registers its
      clockevent device with a dummy rate and sets its final rate through
      clockevents_config() called from its ->set_state_oneshot() and
      ->set_state_periodic() functions respectively.
      
      This patch moves the setting of the clockevent device's rate to its
      registration.
      
      Note that there has been some back and forth regarding this question with
      respect to the clocksource also provided by this driver:
        commit 66f49121 ("clocksource: sh_tmu: compute mult and shift before
                              registration")
      moves the rate determination from the clocksource's ->enable() function to
      before its registration. OTOH, the later
        commit 0aeac458 ("clocksource: sh_tmu: __clocksource_updatefreq_hz()
                              update")
      basically reverts this, saying
        "Without this patch the old code uses clocksource_register() together
         with a hack that assumes a never changing clock rate."
      
      However, I checked all current sh_tmu users in arch/sh as well as in
      arch/arm/mach-shmobile carefully and right now, none of them changes any
      rate in any clock tree relevant to sh_tmu after their respective
      time_init(). Since all sh_tmu instances are created after time_init(), none
      of them should ever observe any clock rate changes.
      
      What's more, both, a clocksource as well as a clockevent device, can
      immediately get selected for use at their registration and thus, enabled
      at this point already. So it's probably safer to assume a "never changing
      clock rate" here.
      
      - Move the struct sh_tmu_channel's ->rate member to struct sh_tmu_device:
        it's a property of the underlying clock which is in turn specific to
        the sh_tmu_device.
      - Determine the ->rate value in sh_tmu_setup() at device probing rather
        than at first usage.
      - Set the clockevent device's rate at its registration.
      - Although not strictly necessary for the upcoming clockevent core changes,
        set the clocksource's rate at its registration for consistency.
      Signed-off-by: NNicolai Stange <nicstange@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      c3c0a20d