1. 28 6月, 2016 1 次提交
    • D
      clocksource/drivers/clksrc-probe: Introduce init functions with return code · b7c4db86
      Daniel Lezcano 提交于
      Currently, the clksrc-probe is not able to handle any error from the init
      functions. There are different issues with the current code:
       - the code is duplicated in the init functions by writing error
       - every driver tends to panic in its own init function
       - counting the number of clocksources is not reliable
      
      This patch adds another table to store the functions returning an error.
      The table is temporary while we convert all the drivers to return an error
      and will disappear.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      b7c4db86
  2. 23 4月, 2016 1 次提交
  3. 27 2月, 2016 1 次提交
  4. 26 11月, 2015 1 次提交
    • T
      timekeeping: Lift clocksource cacheline restriction · 09a99820
      Thomas Gleixner 提交于
      We cache all hotpath members of a clocksource in the time keeper
      core. So there is no requirement in general to cache line align struct
      clocksource. Remove the enforces alignment.
      
      That allows users which need to wrap struct clocksource into their own
      struct to align the struct without getting extra padding.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Mans Rullgard <mans@mansr.com>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Nicolas Pitre <nico@linaro.org>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Sebastian Frias <sebastian_frias@sigmadesigns.com>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1511191209000.3898@nanos
      09a99820
  5. 01 10月, 2015 4 次提交
  6. 22 4月, 2015 1 次提交
  7. 26 3月, 2015 1 次提交
  8. 13 3月, 2015 2 次提交
  9. 12 3月, 2015 1 次提交
  10. 31 12月, 2014 1 次提交
  11. 23 10月, 2014 1 次提交
    • B
      clocksource: Remove "weak" from clocksource_default_clock() declaration · 96a2adbc
      Bjorn Helgaas 提交于
      kernel/time/jiffies.c provides a default clocksource_default_clock()
      definition explicitly marked "weak".  arch/s390 provides its own definition
      intended to override the default, but the "weak" attribute on the
      declaration applied to the s390 definition as well, so the linker chose one
      based on link order (see 10629d71 ("PCI: Remove __weak annotation from
      pcibios_get_phb_of_node decl")).
      
      Remove the "weak" attribute from the clocksource_default_clock()
      declaration so we always prefer a non-weak definition over the weak one,
      independent of link order.
      
      Fixes: f1b82746 ("clocksource: Cleanup clocksource selection")
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NJohn Stultz <john.stultz@linaro.org>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      CC: Daniel Lezcano <daniel.lezcano@linaro.org>
      CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
      96a2adbc
  12. 24 7月, 2014 1 次提交
  13. 21 5月, 2014 1 次提交
  14. 31 7月, 2013 1 次提交
  15. 05 7月, 2013 1 次提交
    • T
      clocksource: Reselect clocksource when watchdog validated high-res capability · 332962f2
      Thomas Gleixner 提交于
      Up to commit 5d33b883 (clocksource: Always verify highres capability)
      we had no sanity check when selecting a clocksource, which prevented
      that a non highres capable clocksource is used when the system already
      switched to highres/nohz mode.
      
      The new sanity check works as Alex and Tim found out. It prevents the
      TSC from being used. This happens because on x86 the boot process
      looks like this:
      
       tsc_start_freqency_validation(TSC);
       clocksource_register(HPET);
       clocksource_done_booting();
      	clocksource_select()
      		Selects HPET which is valid for high-res
      
       switch_to_highres();
      
       clocksource_register(TSC);
       	TSC is not selected, because it is not yet
      	flagged as VALID_HIGH_RES
      
       clocksource_watchdog()
      	Validates TSC for highres, but that does not make TSC
      	the current clocksource.
      
      Before the sanity check was added, we installed TSC unvalidated which
      worked most of the time. If the TSC was really detected as unstable,
      then the unstable logic removed it and installed HPET again.
      
      The sanity check is correct and needed. So the watchdog needs to kick
      a reselection of the clocksource, when it qualifies TSC as a valid
      high res clocksource.
      
      To solve this, we mark the clocksource which got the flag
      CLOCK_SOURCE_VALID_FOR_HRES set by the watchdog with an new flag
      CLOCK_SOURCE_RESELECT and trigger the watchdog thread. The watchdog
      thread evaluates the flag and invokes clocksource_select() when set.
      
      To avoid that the clocksource_done_booting() code, which is about to
      install the first real clocksource anyway, needs to go through
      clocksource_select and tick_oneshot_notify() pointlessly, split out
      the clocksource_watchdog_kthread() list walk code and invoke the
      select/notify only when called from clocksource_watchdog_kthread().
      
      So clocksource_done_booting() can utilize the same splitout code
      without the select/notify invocation and the clocksource_mutex
      unlock/relock dance.
      Reported-and-tested-by: NAlex Shi <alex.shi@intel.com>
      Cc: Hans Peter Anvin <hpa@linux.intel.com>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Andi Kleen <andi.kleen@intel.com>
      Tested-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1307042239150.11637@ionos.tec.linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      332962f2
  16. 16 5月, 2013 3 次提交
  17. 28 3月, 2013 1 次提交
  18. 20 3月, 2013 1 次提交
  19. 16 3月, 2013 1 次提交
  20. 11 3月, 2013 1 次提交
  21. 01 2月, 2013 1 次提交
  22. 03 1月, 2013 1 次提交
    • S
      clocksource: add common of_clksrc_init() function · ae278a93
      Stephen Warren 提交于
      It is desirable to move all clocksource drivers to drivers/clocksource,
      yet each requires its own initialization function. We'd rather not
      pollute <linux/> with a header for each function. Instead, create a
      single of_clksrc_init() function which will determine which clocksource
      driver to initialize based on device tree.
      
      Based on a similar patch for drivers/irqchip by Thomas Petazzoni.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      ae278a93
  23. 25 9月, 2012 1 次提交
    • J
      time: Move update_vsyscall definitions to timekeeper_internal.h · 189374ae
      John Stultz 提交于
      Since users will need to include timekeeper_internal.h, move
      update_vsyscall definitions to timekeeper_internal.h.
      
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Turner <pjt@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      189374ae
  24. 02 2月, 2012 1 次提交
  25. 19 12月, 2011 1 次提交
  26. 11 11月, 2011 1 次提交
    • J
      clocksource: Avoid selecting mult values that might overflow when adjusted · d65670a7
      John Stultz 提交于
      For some frequencies, the clocks_calc_mult_shift() function will
      unfortunately select mult values very close to 0xffffffff.  This
      has the potential to overflow when NTP adjusts the clock, adding
      to the mult value.
      
      This patch adds a clocksource.maxadj value, which provides
      an approximation of an 11% adjustment(NTP limits adjustments to
      500ppm and the tick adjustment is limited to 10%), which could
      be made to the clocksource.mult value. This is then used to both
      check that the current mult value won't overflow/underflow, as
      well as warning us if the timekeeping_adjust() code pushes over
      that 11% boundary.
      
      v2: Fix max_adjustment calculation, and improve WARN_ONCE
      messages.
      
      v3: Don't warn before maxadj has actually been set
      
      CC: Yong Zhang <yong.zhang0@gmail.com>
      CC: David Daney <ddaney.cavm@gmail.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Chen Jie <chenj@lemote.com>
      CC: zhangfx <zhangfx@lemote.com>
      CC: stable@kernel.org
      Reported-by: NChen Jie <chenj@lemote.com>
      Reported-by: Nzhangfx <zhangfx@lemote.com>
      Tested-by: NYong Zhang <yong.zhang0@gmail.com>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      d65670a7
  27. 22 7月, 2011 1 次提交
  28. 15 7月, 2011 1 次提交
  29. 14 7月, 2011 1 次提交
  30. 17 6月, 2011 1 次提交
    • T
      clocksource: Make watchdog robust vs. interruption · b5199515
      Thomas Gleixner 提交于
      The clocksource watchdog code is interruptible and it has been
      observed that this can trigger false positives which disable the TSC.
      
      The reason is that an interrupt storm or a long running interrupt
      handler between the read of the watchdog source and the read of the
      TSC brings the two far enough apart that the delta is larger than the
      unstable treshold. Move both reads into a short interrupt disabled
      region to avoid that.
      Reported-and-tested-by: NVernon Mauery <vernux@us.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: stable@kernel.org
      b5199515
  31. 24 5月, 2011 1 次提交
  32. 19 5月, 2011 1 次提交
  33. 14 5月, 2011 1 次提交
  34. 22 2月, 2011 1 次提交