1. 20 Apr, 2017 1 commit
  2. 19 Apr, 2017 10 commits
  3. 17 Apr, 2017 1 commit
    • Thomas Gleixner's avatar
      Merge branch 'clockevents/4.12' of... · 821596a5
      Thomas Gleixner authored
      Merge branch 'clockevents/4.12' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
      
      Pull clockevents updates from Daniel Lezcano
      
      - Provide a framework to handle errata gracefuly for arm_arch_timer (Mark
         Zyngier)
      
       - Clarify the DT properties for the rockchip timer and add the clocksource as
         an alternative to the bogus architected timer (Alexander Kochetkov)
      
       - Rename the Gemini timer to Faraday timer fttmr010 and provide a specific
         initialization for Gemini (Linus Walleij)
      
       - Add missing newlines in the error message in the timers (Rafał Miłecki)
      
       - Read the clock once and implement the delay timer on Orion (Russell King)
      821596a5
  4. 14 Apr, 2017 28 commits
    • Thomas Gleixner's avatar
      Merge branch 'fortglx/4.12/time' of... · 2886a734
      Thomas Gleixner authored
      Merge branch 'fortglx/4.12/time' of https://git.linaro.org/people/john.stultz/linux into timers/core
      
      Merge timer updates from John Stultz:
      
       A preparatory patch series for correcting the clock event devices via NTP
       to avoid early timer expiry and reprogramming.
      2886a734
    • Nicolai Stange's avatar
      x86/uv/time: Set ->min_delta_ticks and ->max_delta_ticks · 6fc46497
      Nicolai Stange authored
      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.
      
      Currently, the x86's uv rtc clockevent device is initialized as follows:
      
        clock_event_device_uv.min_delta_ns = NSEC_PER_SEC /
                                       sn_rtc_cycles_per_second;
        clock_event_device_uv.max_delta_ns = clocksource_uv.mask *
                                       (NSEC_PER_SEC / sn_rtc_cycles_per_second);
      
      This translates to a ->min_delta_ticks value of 1 and a ->max_delta_ticks
      value of clocksource_uv.mask.
      
      Initialize ->min_delta_ticks and ->max_delta_ticks with these values
      respectively.
      
      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: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Mike Travis <travis@sgi.com>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      6fc46497
    • Nicolai Stange's avatar
      unicore32/time: Set ->min_delta_ticks and ->max_delta_ticks · 16c125b6
      Nicolai Stange authored
      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 unicore32 arch's 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: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      16c125b6
    • Nicolai Stange's avatar
      um/time: Set ->min_delta_ticks and ->max_delta_ticks · 8ab3a284
      Nicolai Stange authored
      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 uml arch's 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: Richard Weinberger <richard@nod.at>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: user-mode-linux-devel@lists.sourceforge.net
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      8ab3a284
    • Nicolai Stange's avatar
      tile/time: Set ->min_delta_ticks and ->max_delta_ticks · 45b586ef
      Nicolai Stange authored
      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.
      
      Currently, the tile's timer clockevent device is initialized as follows:
      
        evt->max_delta_ns = clockevent_delta2ns(MAX_TICK, evt);
      
      and
      
        .min_delta_ns = 1000,
      
      The first one translates to a ->max_delta_ticks value of MAX_TICK.
      For the latter, note that the clockevent core will superimpose a
      minimum of 1us by itself -- setting ->min_delta_ticks to 1 is safe here.
      
      Initialize ->min_delta_ticks and ->max_delta_ticks with these values.
      
      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: Chris Metcalf <cmetcalf@mellanox.com>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      45b586ef
    • Nicolai Stange's avatar
      score/time: Set ->min_delta_ticks and ->max_delta_ticks · c5d71065
      Nicolai Stange authored
      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 score arch's 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: Chen Liqin <liqin.linux@gmail.com>
      Cc: Lennox Wu <lennox.wu@gmail.com>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      c5d71065
    • Nicolai Stange's avatar
      s390/time: Set ->min_delta_ticks and ->max_delta_ticks · 06c54611
      Nicolai Stange authored
      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.
      
      Currently, the s390's CPU timer clockevent device is initialized as
      follows:
      
        cd->min_delta_ns    = 1;
        cd->max_delta_ns    = LONG_MAX;
      
      Note that the device's time to cycle conversion factor, i.e.
      cd->mult / (2^cd->shift), is approx. equal to 4.
      
      Hence, this would translate to
      
        cd->min_delta_ticks = 4;
        cd->max_delta_ticks = 4 * LONG_MAX;
      
      However, a minimum value of 1ns is in the range of noise anyway and the
      clockevent core will take care of this by increasing it to 1us or so.
      Furthermore, 4*LONG_MAX would overflow the unsigned long argument the
      clockevent devices gets programmed with.
      
      Thus, initialize ->min_delta_ticks with 1 and ->max_delta_ticks with
      ULONG_MAX.
      
      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: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
      Cc: linux-s390@vger.kernel.org
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      06c54611
    • Nicolai Stange's avatar
      mn10300/cevt-mn10300: Set ->min_delta_ticks and ->max_delta_ticks · 5f664e2b
      Nicolai Stange authored
      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 mn10300 arch's 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: David Howells <dhowells@redhat.com>
      Cc: linux-am33-list@redhat.com
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      5f664e2b
    • Nicolai Stange's avatar
      c6x/timer64: Set ->min_delta_ticks and ->max_delta_ticks · e1e5fc15
      Nicolai Stange authored
      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 c6x arch's 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: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: linux-c6x-dev@linux-c6x.org
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      e1e5fc15
    • Nicolai Stange's avatar
      blackfin: time-ts: Set ->min_delta_ticks and ->max_delta_ticks · 18154c5c
      Nicolai Stange authored
      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 blackfin arch's 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: Steven Miao <realmz6@gmail.com>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      18154c5c
    • Nicolai Stange's avatar
      x86/apic/timer: Set ->min_delta_ticks and ->max_delta_ticks · 747d04b3
      Nicolai Stange authored
      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 x86 arch's apic 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: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      CC: Dou Liyang <douly.fnst@cn.fujitsu.com>
      Cc: Gu Zheng <guz.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      747d04b3
    • Nicolai Stange's avatar
      MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks · e4db9253
      Nicolai Stange authored
      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 MIPS arch's clockevent drivers 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 these
      drivers.
      
      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: Ralf Baechle <ralf@linux-mips.org>
      Cc: Keguang Zhang <keguang.zhang@gmail.com>
      Cc: John Crispin <john@phrozen.org>
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      e4db9253
    • Nicolai Stange's avatar
      clockevents/drivers/atlas7: Set ->min_delta_ticks and ->max_delta_ticks · 547733c5
      Nicolai Stange authored
      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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      547733c5
    • Nicolai Stange's avatar
      clockevents/drivers/sh_cmt: Set ->min_delta_ticks and ->max_delta_ticks · bb2e94ac
      Nicolai Stange authored
      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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      bb2e94ac
    • Nicolai Stange's avatar
      x86/numachip timer: Set ->min_delta_ticks and ->max_delta_ticks · 6cf57ae8
      Nicolai Stange authored
      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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      6cf57ae8
    • Nicolai Stange's avatar
      clockevents/drivers/metag: Set ->min_delta_ticks and ->max_delta_ticks · c7438ba1
      Nicolai Stange authored
      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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      c7438ba1
    • Nicolai Stange's avatar
      clockevents/drivers/dw_apb: Set ->min_delta_ticks and ->max_delta_ticks · 8317b53f
      Nicolai Stange authored
      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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      8317b53f
    • Nicolai Stange's avatar
      hexagon/time: Set ->min_delta_ticks and ->max_delta_ticks · a60a9fb8
      Nicolai Stange authored
      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 hexagon arch's 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: Richard Kuo <rkuo@codeaurora.org>
      Cc: linux-hexagon@vger.kernel.org
      Acked-by: default avatarRichard Kuo <rkuo@codeaurora.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      a60a9fb8
    • Nicolai Stange's avatar
      x86/lguest/timer: Set ->min_delta_ticks and ->max_delta_ticks · b77f4161
      Nicolai Stange authored
      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 x86 arch's lguest 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: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Paul Bolle <pebolle@tiscali.nl>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
      Cc: lguest@lists.ozlabs.org
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      b77f4161
    • Nicolai Stange's avatar
      sparc/time: Set ->min_delta_ticks and ->max_delta_ticks · 7fd53424
      Nicolai Stange authored
      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 sparc arch's clockevent drivers 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 these
      drivers.
      
      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: "David S. Miller" <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      7fd53424
    • Nicolai Stange's avatar
      powerpc/time: Set ->min_delta_ticks and ->max_delta_ticks · 115631c3
      Nicolai Stange authored
      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 powerpc arch's 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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Oliver O'Halloran <oohall@gmail.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      115631c3
    • Nicolai Stange's avatar
      m68k/coldfire/pit: Set ->min_delta_ticks and ->max_delta_ticks · 33ae7a9b
      Nicolai Stange authored
      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 m68k arch's coldfire 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: Greg Ungerer <gerg@linux-m68k.org>
      CC: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-m68k@lists.linux-m68k.org
      Acked-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      33ae7a9b
    • Nicolai Stange's avatar
      x86/xen/time: Set ->min_delta_ticks and ->max_delta_ticks · 3d18d661
      Nicolai Stange authored
      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 x86 arch's xen 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: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: xen-devel@lists.xenproject.org
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      3d18d661
    • Deepa Dinamani's avatar
      time: Change k_clock nsleep() to use timespec64 · ad196384
      Deepa Dinamani authored
      struct timespec is not y2038 safe on 32 bit machines.  Replace uses of
      struct timespec with struct timespec64 in the kernel.
      
      The syscall interfaces themselves will be changed in a separate series.
      
      Note that the restart_block parameter for nanosleep has also been left
      unchanged and will be part of syscall series noted above.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Cc: y2038@lists.linaro.org
      Cc: john.stultz@linaro.org
      Cc: arnd@arndb.de
      Link: http://lkml.kernel.org/r/1490555058-4603-8-git-send-email-deepa.kernel@gmail.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      ad196384
    • Deepa Dinamani's avatar
      time: Change k_clock timer_set() and timer_get() to use timespec64 · 5f252b32
      Deepa Dinamani authored
      struct timespec is not y2038 safe on 32 bit machines.  Replace uses of
      struct timespec with struct timespec64 in the kernel.
      
      struct itimerspec internally uses struct timespec.  Use struct itimerspec64
      which uses struct timespec64.
      
      The syscall interfaces themselves will be changed in a separate series.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Cc: y2038@lists.linaro.org
      Cc: john.stultz@linaro.org
      Cc: arnd@arndb.de
      Link: http://lkml.kernel.org/r/1490555058-4603-7-git-send-email-deepa.kernel@gmail.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      5f252b32
    • Deepa Dinamani's avatar
      time: Change k_clock clock_set() to use timespec64 · 0fe6afe3
      Deepa Dinamani authored
      struct timespec is not y2038 safe on 32 bit machines.  Replace uses of
      struct timespec with struct timespec64 in the kernel.
      
      The syscall interfaces themselves will be changed in a separate series.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Cc: y2038@lists.linaro.org
      Cc: john.stultz@linaro.org
      Cc: arnd@arndb.de
      Link: http://lkml.kernel.org/r/1490555058-4603-6-git-send-email-deepa.kernel@gmail.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      0fe6afe3
    • Deepa Dinamani's avatar
      time: Change k_clock clock_getres() to use timespec64 · d2e3e0ca
      Deepa Dinamani authored
      struct timespec is not y2038 safe on 32 bit machines.  Replace uses of
      struct timespec with struct timespec64 in the kernel. The syscall
      interfaces themselves will be changed in a separate series.
      
      The clock_getres() interface has also been changed to use timespec64 even
      though this particular interface is not affected by the y2038 problem. This
      helps verification for internal kernel code for y2038 readiness by getting
      rid of time_t/ timeval/ timespec completely.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Cc: y2038@lists.linaro.org
      Cc: john.stultz@linaro.org
      Cc: arnd@arndb.de
      Link: http://lkml.kernel.org/r/1490555058-4603-5-git-send-email-deepa.kernel@gmail.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      d2e3e0ca
    • Deepa Dinamani's avatar
      time: Change k_clock clock_get() to use timespec64 · 3c9c12f4
      Deepa Dinamani authored
      struct timespec is not y2038 safe on 32 bit machines.  Replace uses of
      struct timespec with struct timespec64 in the kernel.
      
      The syscall interfaces themselves will be changed in a separate series.
      Signed-off-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
      Cc: y2038@lists.linaro.org
      Cc: john.stultz@linaro.org
      Cc: arnd@arndb.de
      Link: http://lkml.kernel.org/r/1490555058-4603-4-git-send-email-deepa.kernel@gmail.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      3c9c12f4