21 Mar, 2020

1 commit

  • The vDSO library should only include the necessary headers required for
    a userspace library (UAPI and a minimal set of kernel headers). To make
    this possible it is necessary to isolate from the kernel headers the
    common parts that are strictly necessary to build the library.

    Split clocksource.h into linux and common headers to make the latter
    suitable for inclusion in the vDSO library.

    Signed-off-by: Vincenzo Frascino
    Signed-off-by: Thomas Gleixner
    Link: https://lkml.kernel.org/r/20200320145351.32292-9-vincenzo.frascino@arm.com

    Vincenzo Frascino
     

18 Feb, 2020

2 commits


17 Feb, 2020

2 commits

  • All architectures which use the generic VDSO code have their own storage
    for the VDSO clock mode. That's pointless and just requires duplicate code.

    Provide generic storage for it. The new Kconfig symbol is intermediate and
    will be removed once all architectures are converted over.

    Signed-off-by: Thomas Gleixner
    Tested-by: Vincenzo Frascino
    Reviewed-by: Vincenzo Frascino
    Link: https://lkml.kernel.org/r/20200207124403.028046322@linutronix.de

    Thomas Gleixner
     
  • Reformat the struct definition, add missing member documentation.
    No functional change.

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Vincenzo Frascino
    Link: https://lkml.kernel.org/r/20200207124402.825471920@linutronix.de

    Thomas Gleixner
     

26 Oct, 2018

1 commit

  • Pull timekeeping updates from Thomas Gleixner:
    "The timers and timekeeping departement provides:

    - Another large y2038 update with further preparations for providing
    the y2038 safe timespecs closer to the syscalls.

    - An overhaul of the SHCMT clocksource driver

    - SPDX license identifier updates

    - Small cleanups and fixes all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
    tick/sched : Remove redundant cpu_online() check
    clocksource/drivers/dw_apb: Add reset control
    clocksource: Remove obsolete CLOCKSOURCE_OF_DECLARE
    clocksource/drivers: Unify the names to timer-* format
    clocksource/drivers/sh_cmt: Add R-Car gen3 support
    dt-bindings: timer: renesas: cmt: document R-Car gen3 support
    clocksource/drivers/sh_cmt: Properly line-wrap sh_cmt_of_table[] initializer
    clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines
    clocksource/drivers/sh_cmt: Fixup for 64-bit machines
    clocksource/drivers/sh_tmu: Convert to SPDX identifiers
    clocksource/drivers/sh_mtu2: Convert to SPDX identifiers
    clocksource/drivers/sh_cmt: Convert to SPDX identifiers
    clocksource/drivers/renesas-ostm: Convert to SPDX identifiers
    clocksource: Convert to using %pOFn instead of device_node.name
    tick/broadcast: Remove redundant check
    RISC-V: Request newstat syscalls
    y2038: signal: Change rt_sigtimedwait to use __kernel_timespec
    y2038: socket: Change recvmmsg to use __kernel_timespec
    y2038: sched: Change sched_rr_get_interval to use __kernel_timespec
    y2038: utimes: Rework #ifdef guards for compat syscalls
    ...

    Linus Torvalds
     

05 Oct, 2018

1 commit

  • Architectures have extra archdata in the clocksource, e.g. for VDSO
    support. There are no sanity checks or general initializations for this
    available. Add support for that.

    Signed-off-by: Thomas Gleixner
    Acked-by: Andy Lutomirski
    Acked-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Matt Rickard
    Cc: Stephen Boyd
    Cc: Florian Weimer
    Cc: "K. Y. Srinivasan"
    Cc: Vitaly Kuznetsov
    Cc: devel@linuxdriverproject.org
    Cc: virtualization@lists.linux-foundation.org
    Cc: Paolo Bonzini
    Cc: Arnd Bergmann
    Cc: Juergen Gross
    Link: https://lkml.kernel.org/r/20180917130706.973042587@linutronix.de

    Thomas Gleixner
     

03 Oct, 2018

1 commit

  • The macro CLOCKSOURCE_OF_DECLARE was renamed more TIMER_OF_DECLARE, and we
    kept an alias CLOCKSOURCE_OF_DECLARE in order to smooth the transition for
    drivers.

    This change was done 1.5 year ago, we can reasonably remove this backward
    compatible macro as it is no longer used anywhere.

    Signed-off-by: Daniel Lezcano

    Daniel Lezcano
     

20 Jul, 2018

1 commit

  • On some hardware with multiple clocksources, we have coarse grained
    clocksources that support the CLOCK_SOURCE_SUSPEND_NONSTOP flag, but
    which are less than ideal for timekeeping whereas other clocksources
    can be better candidates but halt on suspend.

    Currently, the timekeeping core only supports timing suspend using
    CLOCK_SOURCE_SUSPEND_NONSTOP clocksources if that clocksource is the
    current clocksource for timekeeping.

    As a result, some architectures try to implement read_persistent_clock64()
    using those non-stop clocksources, but isn't really ideal, which will
    introduce more duplicate code. To fix this, provide logic to allow a
    registered SUSPEND_NONSTOP clocksource, which isn't the current
    clocksource, to be used to calculate the suspend time.

    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Miroslav Lichvar
    Cc: Richard Cochran
    Cc: Prarit Bhargava
    Cc: Stephen Boyd
    Cc: Daniel Lezcano
    Reviewed-by: Thomas Gleixner
    Reviewed-by: Daniel Lezcano
    Suggested-by: Thomas Gleixner
    Signed-off-by: Baolin Wang
    [jstultz: minor tweaks to merge with previous resume changes]
    Signed-off-by: John Stultz

    Baolin Wang
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

04 Jul, 2017

1 commit

  • Pull timer updates from Thomas Gleixner:
    "A rather large update for timers/timekeeping:

    - compat syscall consolidation (Al Viro)

    - Posix timer consolidation (Christoph Helwig / Thomas Gleixner)

    - Cleanup of the device tree based initialization for clockevents and
    clocksources (Daniel Lezcano)

    - Consolidation of the FTTMR010 clocksource/event driver (Linus
    Walleij)

    - The usual set of small fixes and updates all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (93 commits)
    timers: Make the cpu base lock raw
    clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()'
    clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap
    clocksource/drivers/tcb_clksrc: Make IO endian agnostic
    clocksource/drivers/sun4i: Switch to the timer-of common init
    clocksource/drivers/timer-of: Fix invalid iomap check
    Revert "ktime: Simplify ktime_compare implementation"
    clocksource/drivers: Fix uninitialized variable use in timer_of_init
    kselftests: timers: Add test for frequency step
    kselftests: timers: Fix inconsistency-check to not ignore first timestamp
    time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD
    time: Clean up CLOCK_MONOTONIC_RAW time handling
    posix-cpu-timers: Make timespec to nsec conversion safe
    itimer: Make timeval to nsec conversion range limited
    timers: Fix parameter description of try_to_del_timer_sync()
    ktime: Simplify ktime_compare implementation
    clocksource/drivers/fttmr010: Factor out clock read code
    clocksource/drivers/fttmr010: Implement delay timer
    clocksource/drivers: Add timer-of common init routine
    clocksource/drivers/tcb_clksrc: Save timer context on suspend/resume
    ...

    Linus Torvalds
     

14 Jun, 2017

6 commits

  • The macro CLOCKSOURCE_OF_DECLARE has been rename to TIMER_OF_DECLARE.

    In order to prevent conflicts for the next merge window, a temporary
    alias has been added which will be removed later.

    Cc: Arnd Bergman
    Signed-off-by: Daniel Lezcano

    Daniel Lezcano
     
  • The config option name is now renamed to 'TIMER_OF' for consistency with
    the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change.

    Signed-off-by: Daniel Lezcano
    Reviewed-by: Linus Walleij

    Daniel Lezcano
     
  • The table name is now renamed to 'timer' for consistency with
    the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change.

    Signed-off-by: Daniel Lezcano
    Reviewed-by: Linus Walleij

    Daniel Lezcano
     
  • The macro name is now renamed to 'TIMER_ACPI_DECLARE' for consistency
    with the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change.

    Signed-off-by: Daniel Lezcano
    Reviewed-by: Linus Walleij

    Daniel Lezcano
     
  • The function name is now renamed to 'timer_probe' for consistency with
    the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change.

    Signed-off-by: Daniel Lezcano
    Acked-by: Viresh Kumar
    Acked-by: Heiko Stuebner
    Reviewed-by: Linus Walleij

    Daniel Lezcano
     
  • The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the
    clocksource at early stage. However, this macro is also used to initialize
    the clockevent if any, or the clockevent only.

    It was originally suggested to declare another macro to initialize a
    clockevent, so in order to separate the two entities even they belong to the
    same IP. This was not accepted because of the impact on the DT where splitting
    a clocksource/clockevent definition does not make sense as it is a Linux
    concept not a hardware description.

    On the other side, the clocksource has not interrupt declared while the
    clockevent has, so it is easy from the driver to know if the description is
    for a clockevent or a clocksource, IOW it could be implemented at the driver
    level.

    So instead of dealing with a named clocksource macro, let's use a more generic
    one: TIMER_OF_DECLARE.

    The patch has not functional changes.

    Signed-off-by: Daniel Lezcano
    Acked-by: Heiko Stuebner
    Acked-by: Neil Armstrong
    Acked-by: Arnd Bergmann
    Acked-by: Matthias Brugger
    Reviewed-by: Linus Walleij

    Daniel Lezcano
     

15 May, 2017

1 commit

  • Currently we keep sched_clock_tick() active for stable TSC in order to
    keep the per-CPU state semi up-to-date. The (obvious) problem is that
    by the time we detect TSC is borked, our per-CPU state is also borked.

    So hook into the clocksource watchdog and call a method after we've
    found it to still be stable.

    There's the obvious race where the TSC goes wonky between finding it
    stable and us running the callback, but closing that is too much work
    and not really worth it, since we're already detecting TSC wobbles
    after the fact, so we cannot, per definition, fully avoid funny clock
    values.

    And since the watchdog runs less often than the tick, this is also an
    optimization.

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

20 Apr, 2017

1 commit

  • Besides reusing existing code this removes the special case handling
    for 64-bit masks, which causes clang to raise a shift count overflow
    warning due to https://bugs.llvm.org//show_bug.cgi?id=10030.

    Suggested-by: Dmitry Torokhov
    Signed-off-by: Matthias Kaehlcke
    Cc: Grant Grundler
    Cc: Greg Hackmann
    Cc: Michael Davidson
    Cc: John Stultz
    Link: http://lkml.kernel.org/r/20170418233037.70990-1-mka@chromium.org
    Signed-off-by: Thomas Gleixner

    Matthias Kaehlcke
     

14 Jan, 2017

1 commit

  • PeterZ reported that we'd fail to mark the TSC unstable when the
    clocksource watchdog finds it unsuitable.

    Allow a clocksource to run a custom action when its being marked
    unstable and hook up the TSC unstable code.

    Reported-by: Peter Zijlstra (Intel)
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

25 Dec, 2016

1 commit


30 Nov, 2016

1 commit

  • The "cycles" argument should not be an absolute clocksource cycle
    value, as the implementation's arithmetic will overflow relatively
    easily with wide (64 bit) clocksource counters.

    For performance, the implementation is simple and fast, since the
    function is intended for only relatively small delta values of
    clocksource cycles.

    [jstultz: Fixed up to merge against HEAD & commit message tweaks,
    also included rewording suggestion by Ingo]
    Signed-off-by: Chris Metcalf
    Signed-off-by: John Stultz
    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Link: http://lkml.kernel.org/r/1480372524-15181-4-git-send-email-john.stultz@linaro.org
    Signed-off-by: Thomas Gleixner

    Chris Metcalf
     

28 Jun, 2016

2 commits

  • All the clocksource drivers's init function are now converted to return
    an error code. CLOCKSOURCE_OF_DECLARE is no longer used as well as the
    clksrc-of table.

    Let's convert back the names:
    - CLOCKSOURCE_OF_DECLARE_RET => CLOCKSOURCE_OF_DECLARE
    - clksrc-of-ret => clksrc-of

    Signed-off-by: Daniel Lezcano

    For exynos_mct and samsung_pwm_timer:
    Acked-by: Krzysztof Kozlowski

    For arch/arc:
    Acked-by: Vineet Gupta

    For mediatek driver:
    Acked-by: Matthias Brugger

    For the Rockchip-part
    Acked-by: Heiko Stuebner

    For STi :
    Acked-by: Patrice Chotard

    For the mps2-timer.c and versatile.c changes:
    Acked-by: Liviu Dudau

    For the OXNAS part :
    Acked-by: Neil Armstrong

    For LPC32xx driver:
    Acked-by: Sylvain Lemieux

    For Broadcom Kona timer change:
    Acked-by: Ray Jui

    For Sun4i and Sun5i:
    Acked-by: Chen-Yu Tsai

    For Meson6:
    Acked-by: Carlo Caione

    For Keystone:
    Acked-by: Santosh Shilimkar

    For NPS:
    Acked-by: Noam Camus

    For bcm2835:
    Acked-by: Eric Anholt

    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: Daniel Lezcano

    Daniel Lezcano
     

23 Apr, 2016

1 commit

  • This header uses OF_DELCARE_1 which is defined in linux/of.h.

    This fixes getting unhelpful compiler error messages about missing ')'
    before a string constant.

    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: David Lechner
    Signed-off-by: John Stultz

    David Lechner
     

27 Feb, 2016

1 commit

  • The clocksource_khz2mult() and clocksource_hz2mult() share similar
    code wihch calculates a mult from the given frequency. Both implementations
    in differ only in value of a frequency. This patch introduces the
    clocksource_freq2mult() helper with generic implementation of
    mult calculation to prevent code duplication.

    Signed-off-by: Alexander Kuleshov
    Signed-off-by: John Stultz
    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Link: http://lkml.kernel.org/r/1456542854-22104-2-git-send-email-john.stultz@linaro.org
    Signed-off-by: Thomas Gleixner

    Alexander Kuleshov
     

26 Nov, 2015

1 commit

  • 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: Thomas Gleixner
    Cc: John Stultz
    Cc: Russell King - ARM Linux
    Cc: Marc Gonzalez
    Cc: Daniel Lezcano
    Cc: Mans Rullgard
    Cc: Viresh Kumar
    Cc: Nicolas Pitre
    Cc: Tony Lindgren
    Cc: Sebastian Frias
    Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1511191209000.3898@nanos

    Thomas Gleixner
     

01 Oct, 2015

4 commits

  • Seeing the 'of' characters in a symbol that is being called from
    ACPI seems to freak out people. So let's do a bit of pointless
    renaming so that these folks do feel at home.

    Signed-off-by: Marc Zyngier
    Acked-by: Catalin Marinas
    Reviewed-by: Hanjun Guo
    Acked-by: Thomas Gleixner
    Tested-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Marc Zyngier
     
  • It is now absolutely trivial to convert the arch timer driver to
    use ACPI probing, just like its DT counterpart.

    Let's enjoy another crapectomy.

    Signed-off-by: Marc Zyngier
    Acked-by: Catalin Marinas
    Acked-by: Thomas Gleixner
    Tested-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Marc Zyngier
     
  • The clocksource probing infrastructure currently depends on
    CONFIG_CLKSRC_OF, which depends on CONFIG_OF. In order to make
    this infrastructure selectable even if CONFIG_OF is not selected,
    introduce a new CONFIG_CLKSRC_PROBE (which allow the infrastructure
    to be compiled in), and CONFIG_CLKSRC_ACPI (which is the pendent
    of CONFIG_CLKSRC_OF for ACPI).

    Signed-off-by: Marc Zyngier
    Acked-by: Thomas Gleixner
    Tested-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Marc Zyngier
     
  • DT enjoys a rather nice probing infrastructure for clocksources,
    while ACPI is so far stuck into a very distant past.

    This patch introduces a declarative API, allowing clocksources
    to be self-contained and be called when parsing the GTDT table.

    Signed-off-by: Marc Zyngier
    Acked-by: Thomas Gleixner
    Tested-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Marc Zyngier
     

19 May, 2015

1 commit


24 Apr, 2015

1 commit

  • Pull initial ACPI support for arm64 from Will Deacon:
    "This series introduces preliminary ACPI 5.1 support to the arm64
    kernel using the "hardware reduced" profile. We don't support any
    peripherals yet, so it's fairly limited in scope:

    - MEMORY init (UEFI)

    - ACPI discovery (RSDP via UEFI)

    - CPU init (FADT)

    - GIC init (MADT)

    - SMP boot (MADT + PSCI)

    - ACPI Kconfig options (dependent on EXPERT)

    ACPI for arm64 has been in development for a while now and hardware
    has been available that can boot with either FDT or ACPI tables. This
    has been made possible by both changes to the ACPI spec to cater for
    ARM-based machines (known as "hardware-reduced" in ACPI parlance) but
    also a Linaro-driven effort to get this supported on top of the Linux
    kernel. This pull request is the result of that work.

    These changes allow us to initialise the CPUs, interrupt controller,
    and timers via ACPI tables, with memory information and cmdline coming
    from EFI. We don't support a hybrid ACPI/FDT scheme. Of course,
    there is still plenty of work to do (a serial console would be nice!)
    but I expect that to happen on a per-driver basis after this core
    series has been merged.

    Anyway, the diff stat here is fairly horrible, but splitting this up
    and merging it via all the different subsystems would have been
    extremely painful. Instead, we've got all the relevant Acks in place
    and I've not seen anything other than trivial (Kconfig) conflicts in
    -next (for completeness, I've included my resolution below). Nearly
    half of the insertions fall under Documentation/.

    So, we'll see how this goes. Right now, it all depends on EXPERT and
    I fully expect people to use FDT by default for the immediate future"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (31 commits)
    ARM64 / ACPI: make acpi_map_gic_cpu_interface() as void function
    ARM64 / ACPI: Ignore the return error value of acpi_map_gic_cpu_interface()
    ARM64 / ACPI: fix usage of acpi_map_gic_cpu_interface
    ARM64: kernel: acpi: honour acpi=force command line parameter
    ARM64: kernel: acpi: refactor ACPI tables init and checks
    ARM64: kernel: psci: let ACPI probe PSCI version
    ARM64: kernel: psci: factor out probe function
    ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer
    ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed
    ARM64 / ACPI: additions of ACPI documentation for arm64
    Documentation: ACPI for ARM64
    ARM64 / ACPI: Enable ARM64 in Kconfig
    XEN / ACPI: Make XEN ACPI depend on X86
    ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64
    clocksource / arch_timer: Parse GTDT to initialize arch timer
    irqchip: Add GICv2 specific ACPI boot support
    ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi
    ACPI / processor: Make it possible to get CPU hardware ID via GICC
    ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID
    ARM64 / ACPI: Parse MADT for SMP initialization
    ...

    Linus Torvalds
     

22 Apr, 2015

1 commit

  • The function clocksource_get_next() was removed in commit 75c5158f70
    (timekeeping: Update clocksource with stop_machine), but the
    prototype was not removed with it. Remove the prototype.

    Signed-off-by: Yingjoe Chen
    Cc:
    Cc: Martin Schwidefsky
    Cc:
    Cc: John Stultz
    Link: http://lkml.kernel.org/r/1428674150-1780-1-git-send-email-yingjoe.chen@mediatek.com
    Signed-off-by: Thomas Gleixner

    Yingjoe Chen
     

26 Mar, 2015

1 commit

  • Using the information presented by GTDT (Generic Timer Description Table)
    to initialize the arch timer (not memory-mapped).

    CC: Daniel Lezcano
    CC: Thomas Gleixner
    Originally-by: Amit Daniel Kachhap
    Tested-by: Suravee Suthikulpanit
    Tested-by: Yijing Wang
    Tested-by: Mark Langsdorf
    Tested-by: Jon Masters
    Tested-by: Timur Tabi
    Tested-by: Robert Richter
    Acked-by: Robert Richter
    Acked-by: Daniel Lezcano
    Reviewed-by: Grant Likely
    Signed-off-by: Hanjun Guo
    Signed-off-by: Will Deacon

    Hanjun Guo
     

13 Mar, 2015

2 commits

  • Ingo requested this function be renamed to improve readability,
    so I've renamed __clocksource_updatefreq_scale() as well as the
    __clocksource_updatefreq_hz/khz() functions to avoid
    squishedtogethernames.

    This touches some of the sh clocksources, which I've not tested.

    The arch/arm/plat-omap change is just a comment change for
    consistency.

    Signed-off-by: John Stultz
    Cc: Daniel Lezcano
    Cc: Dave Jones
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Cc: Stephen Boyd
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1426133800-29329-13-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    John Stultz
     
  • A long running project has been to clean up remaining uses
    of clocksource_register(), replacing it with the simpler
    clocksource_register_khz/hz() functions.

    However, there are a few cases where we need to self-define
    our mult/shift values, so switch the function to a more
    obviously internal __clocksource_register() name, and
    consolidate much of the internal logic so we don't have
    duplication.

    Signed-off-by: John Stultz
    Cc: Dave Jones
    Cc: David S. Miller
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Peter Zijlstra
    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Cc: Stephen Boyd
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1426133800-29329-10-git-send-email-john.stultz@linaro.org
    [ Minor cleanups. ]
    Signed-off-by: Ingo Molnar

    John Stultz
     

12 Mar, 2015

1 commit

  • In order to facilitate clocksource validation, add a
    'max_cycles' field to the clocksource structure which
    will hold the maximum cycle value that can safely be
    multiplied without potentially causing an overflow.

    Signed-off-by: John Stultz
    Cc: Dave Jones
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Cc: Stephen Boyd
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1426133800-29329-4-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    John Stultz
     

31 Dec, 2014

1 commit


23 Oct, 2014

1 commit

  • 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 10629d711ed7 ("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: f1b82746c1e9 ("clocksource: Cleanup clocksource selection")
    Signed-off-by: Bjorn Helgaas
    Acked-by: John Stultz
    Acked-by: Ingo Molnar
    CC: Daniel Lezcano
    CC: Martin Schwidefsky

    Bjorn Helgaas