1. 02 Nov, 2017 3 commits
  2. 01 Nov, 2017 18 commits
  3. 31 Oct, 2017 2 commits
    • Thomas Gleixner's avatar
      Merge branch 'clockevents/4.15' of... · eccbf5fb
      Thomas Gleixner authored
      Merge branch 'clockevents/4.15' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
      
      Pull clockevent updates from Daniel Lezcano:
      
       - Improve the generic clockevents dependency by factoring out the option
         in the Kconfig menu option (Arnd Bergmann)
      
       - Add missing "\n" in pr_err messages for fttmr010, owl and rockchip
         (Arvind Yadav)
      
       - Add missing timer_of_exit function to rollback timer_of_init (Benjamin
         Gaignard)
      
       - Fix path and add bindings to timers (Daniel Lezcano)
      
       - Cleanup and remove support for renesas,cmt-32* (Geert Uytterhoeven)
      
       - Add support for separate R-Car Gen2 (Magnus Damm)
      
       - Fix DEFINE_PER_CPU length definition to prevent warning at expansion
         time for the arm_arch_timer (Mark Rutland)
      
       - Remove pointless irq_save,restore in an already irq-disabled callback
         and add a shortcut optimization for the local cpu on mips-gic-timer
         (Matt Redfearn)
      eccbf5fb
    • Thomas Gleixner's avatar
      Merge branch 'fortglx/4.15/time' of... · fb56d689
      Thomas Gleixner authored
      Merge branch 'fortglx/4.15/time' of https://git.linaro.org/people/john.stultz/linux into timers/core
      
      Pull timekeeping updates from John Stultz:
      
       - More y2038 work from Arnd Bergmann
      
       - A new mechanism to allow RTC drivers to specify the resolution of the
         RTC so the suspend/resume code can make informed decisions whether to
         inject the suspended time or not in case of fast suspend/resume cycles.
      fb56d689
  4. 30 Oct, 2017 7 commits
    • Arnd Bergmann's avatar
      time: Move old timekeeping interfaces to timekeeping32.h · 6546911e
      Arnd Bergmann authored
      The interfaces based on 'struct timespec' and 'unsigned long' seconds
      are no longer recommended for new code, and we are trying to migrate to
      ktime_t based interfaces and other y2038-safe variants.
      
      This moves all the legacy interfaces from linux/timekeeping.h into a
      new timekeeping32.h to better document this.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miroslav Lichvar <mlichvar@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      6546911e
    • Arnd Bergmann's avatar
      time: Move time_t conversion helpers to time32.h · abc8f96e
      Arnd Bergmann authored
      On 64-bit architectures, the timespec64 based helpers in linux/time.h
      are defined as macros pointing to their timespec based counterparts.
      This made sense when they were first introduced, but as we are migrating
      away from timespec in general, it's much less intuitive now.
      
      This changes the macros to work in the exact opposite way: we always
      provide the timespec64 based helpers and define the old interfaces as
      macros for them. Now we can move those macros into linux/time32.h, which
      already contains the respective helpers for 32-bit architectures.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miroslav Lichvar <mlichvar@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      abc8f96e
    • Arnd Bergmann's avatar
      time: Move time_t based interfaces to time32.h · 5dbf2012
      Arnd Bergmann authored
      Interfaces based on 'struct timespec' or 'struct timeval' should no
      longer be used for new code, which can use either ktime_t or 'struct
      timespec64' instead.
      
      To make this a little clearer, this moves the various helpers into a new
      time32.h header. For the moment, this gets included by the normal time.h,
      but we may be able to separate it entirely when most users of time32.h
      are gone.
      
      Individual helpers in the new file can get removed once they become unused
      in the future.
      
      Since the contents of time32.h look a lot like what's in time64.h, I'm
      reordering them during the move to make them more similar, and to allow
      a follow-up patch to redirect the 'timespec' based functions to thei
      'timespec64' based counterparts on 64-bit architectures later.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miroslav Lichvar <mlichvar@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      [jstultz: Whitespace & checkpatch fixups]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      5dbf2012
    • Arnd Bergmann's avatar
      time: Remove unused functions · 85bf19e7
      Arnd Bergmann authored
      The (slow but) ongoing work on conversion from timespec to timespec64
      has led some timespec based helper functions to become unused.
      
      No new code should use them, so we can remove the functions entirely.
      I'm planning to obsolete additional interfaces next and remove
      more of these.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miroslav Lichvar <mlichvar@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      85bf19e7
    • Arnd Bergmann's avatar
      timekeeping: Use timespec64 in timekeeping_inject_offset · 1572fa03
      Arnd Bergmann authored
      As part of changing all the timekeeping code to use 64-bit
      time_t consistently, this removes the uses of timeval
      and timespec as much as possible from do_adjtimex() and
      timekeeping_inject_offset(). The timeval_inject_offset_valid()
      and timespec_inject_offset_valid() just complicate this,
      so I'm folding them into the respective callers.
      
      This leaves the actual 'struct timex' definition, which
      is part of the user-space ABI and should be dealt with
      separately when we have agreed on the ABI change.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miroslav Lichvar <mlichvar@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      1572fa03
    • Arnd Bergmann's avatar
      timekeeping: Consolidate timekeeping_inject_offset code · e0956dcc
      Arnd Bergmann authored
      The code to check the adjtimex() or clock_adjtime() arguments is spread
      out across multiple files for presumably only historic reasons. As a
      preparatation for a rework to get rid of the use of 'struct timeval'
      and 'struct timespec' in there, this moves all the portions into
      kernel/time/timekeeping.c and marks them as 'static'.
      
      The warp_clock() function here is not as closely related as the others,
      but I feel it still makes sense to move it here in order to consolidate
      all callers of timekeeping_inject_offset().
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miroslav Lichvar <mlichvar@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      [jstultz: Whitespace fixup]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      e0956dcc
    • Jason Gunthorpe's avatar
      rtc: Allow rtc drivers to specify the tv_nsec value for ntp · 0f295b06
      Jason Gunthorpe authored
      ntp is currently hardwired to try and call the rtc set when wall clock
      tv_nsec is 0.5 seconds. This historical behaviour works well with certain
      PC RTCs, but is not universal to all rtc hardware.
      
      Change how this works by introducing the driver specific concept of
      set_offset_nsec, the delay between current wall clock time and the target
      time to set (with a 0 tv_nsecs).
      
      For x86-style CMOS set_offset_nsec should be -0.5 s which causes the last
      second to be written 0.5 s after it has started.
      
      For compat with the old rtc_set_ntp_time, the value is defaulted to
      + 0.5 s, which causes the next second to be written 0.5s before it starts,
      as things were before this patch.
      
      Testing shows many non-x86 RTCs would like set_offset_nsec ~= 0,
      so ultimately each RTC driver should set the set_offset_nsec according
      to its needs, and non x86 architectures should stop using
      update_persistent_clock64 in order to access this feature.
      Future patches will revise the drivers as needed.
      
      Since CMOS and RTC now have very different handling they are split
      into two dedicated code paths, sharing the support code, and ifdefs
      are replaced with IS_ENABLED.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miroslav Lichvar <mlichvar@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Stephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      0f295b06
  5. 29 Oct, 2017 2 commits
  6. 27 Oct, 2017 8 commits