03 Apr, 2015

23 commits

  • Replace the clockevents_notify() call with an explicit function call.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Len Brown
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1521832.mm0ZfkTzTA@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Replace the clockevents_notify() call with an explicit function call.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1528188.S1pjqkSL1P@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • clockevents_notify() is a leftover from the early design of the
    clockevents facility. It's really not a notification mechanism,
    it's a multiplex call. We are way better off to have explicit
    calls instead of this monstrosity.

    Split out the broadcast control into a separate function and
    provide inline helpers. Switch clockevents_notify() over. This
    will go away once all callers are converted.

    This also gets rid of the nested locking of clockevents_lock and
    broadcast_lock. The broadcast control functions do not require
    clockevents_lock. Only the managing functions
    (setup/shutdown/suspend/resume of the broadcast device require
    clockevents_lock.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Daniel Lezcano
    Cc: Len Brown
    Cc: Peter Zijlstra
    Cc: Tony Lindgren
    Link: http://lkml.kernel.org/r/8086559.ttsuS0n1Xr@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • While looking through the (ab)use of the clockevents_notify()
    function I stumbled over the following gem in the acpi_pad code:

    if (lapic_detected_unstable && !lapic_marked_unstable) {
    /* LAPIC could halt in idle, so notify users */
    for_each_online_cpu(i)
    clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &i);
    lapic_marked_unstable = 1;
    }

    This code calls on the cpu which detects the lapic unstable
    condition first clockevents_notify() to tell the core code that
    the broadcast should be enabled on all online cpus. Brilliant
    stuff that as it notifies the core code a num_online_cpus()
    times that the broadcast should be enabled on the current cpu.

    This probably has never been noticed because that code got never
    tested with NOHZ=n and HIGHRES_TIMER=n or it just worked by
    chance because one of the other mechanisms told the core in the
    right way that the local apic timer is wreckaged.

    Sigh, this is:

    - The 4th incarnation of idle drivers which has their own mechanism
    to detect and deal with X86_FEATURE_ARAT.

    - The 2nd incarnation of fake idle mechanisms with a different set of
    brainmelting bugs.

    - Has been merged against an explicit NAK of the scheduler
    maintainer with the promise to improve it over time.

    - Another example of featuritis driven trainwreck engineering.

    - Another pointless waste of my time.

    Fix this nonsense by removing that lapic detection and
    notification logic and simply call into the clockevents code
    unconditonally. The ARAT feature is marked in the lapic
    clockevent already so the core code will just ignore the
    requests and return.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1887788.RObRuI4tSv@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Ingo noted that the description of clocks_calc_max_nsecs()'s
    50% safety margin was somewhat circular. So this patch tries
    to improve the comment to better explain what we mean by the
    50% safety margin and why we need it.

    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-20-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    John Stultz
     
  • If a system does not provide a persistent_clock(), the time
    will be updated on resume by rtc_resume(). With the addition
    of the non-stop clocksources for suspend timing, those systems
    set the time on resume in timekeeping_resume(), but may not
    provide a valid persistent_clock().

    This results in the rtc_resume() logic thinking no one has set
    the time and it then will over-write the suspend time again,
    which is not necessary and only increases clock error.

    So, fix this for rtc_resume().

    This patch also improves the name of persistent_clock_exist to
    make it more grammatical.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-19-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • When there's no persistent clock, normally
    timekeeping_suspend_time should always be zero, but this can
    break in timekeeping_suspend().

    At T1, there was a system suspend, so old_delta was assigned T1.
    After some time, one time adjustment happened, and xtime got the
    value of T1-dt(0s


    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-18-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • rtc_read_time() has already judged valid tm by rtc_valid_tm(),
    so just remove it.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-17-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • timekeeping_inject_sleeptime64() is only used by RTC
    suspend/resume, so add build dependencies on the necessary RTC
    related macros.

    Signed-off-by: Xunlei Pang
    [ Improve commit message clarity. ]
    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-16-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • Change alpha_rtc_set_mmss() and remote_set_mmss() to use
    rtc_class_ops's set_mmss64(), to be y2038 safe.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Richard Henderson
    Link: http://lkml.kernel.org/r/1427945681-29972-15-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • This driver has a number of y2038/y2106 issues.

    This patch resolves them by:

    - Replacing rtc_time_to_tm() with rtc_time64_to_tm()
    - Replacing rtc_tm_to_time() with rtc_tm_to_time64()
    - Changing mxc_rtc_set_mmss() to use rtc_class_ops's set_mmss64()

    After this patch, the driver should not have any remaining
    y2038/y2106 issues.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-14-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • We want to convert mxc_rtc_set_mmss() to use rtc_class_ops's
    set_mmss64(), but it uses get_alarm_or_time()/set_alarm_or_time()
    internal interfaces which are y2038 unsafe.

    So here as a separate patch, it converts these two internal
    interfaces of "mxc" to use safe time64_t to make some
    preparations.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-13-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • rtc_class_ops's set_alarm() shouldn't deal with the alarm date,
    as this is handled in the rtc core.

    See rtc_dev_ioctl()'s RTC_ALM_SET and RTC_WKALM_SET cases.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-12-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • This driver has a number of y2038/y2106 issues.

    This patch resolves them by:

    - Replacing rtc_time_to_tm() with rtc_time64_to_tm()
    - Changing mc13xxx_rtc_set_mmss() to use rtc_class_ops's set_mmss64()

    After this patch, the driver should not have any remaining
    y2038/y2106 issues.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-11-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • This driver has a number of y2038/y2106 issues.

    This patch resolves them by:

    - Replacing rtc_tm_to_time() with rtc_tm_to_time64()
    - Replacing rtc_time_to_tm() with rtc_time64_to_tm()
    - Changing ab3100_rtc_set_mmss() to use rtc_class_ops's set_mmss64()

    After this patch, the driver should not have any remaining
    y2038/y2106 issues.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Acked-by: Linus Walleij
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-10-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • This driver has a number of y2038/y2106 issues.

    This patch resolves them by:

    - Replacing get_seconds() with ktime_get_real_seconds()
    - Replacing rtc_time_to_tm() with rtc_time64_to_tm()

    Also add test_rtc_set_mmss64() for testing rtc_class_ops's
    set_mmss64(), which can be activated by "test_mmss64" module
    parameter.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-9-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • Currently the rtc_class_op's set_mmss() function takes a 32-bit
    second value (on 32-bit systems), which is problematic for dates
    past y2038.

    This patch provides a safe version named set_mmss64() using
    y2038 safe time64_t.

    After this patch, set_mmss() is deprecated and all its users
    will be fixed to use set_mmss64(), it can be removed when having
    no users.

    Signed-off-by: Xunlei Pang
    [jstultz: Add whitespace fix for checkpatch]
    Signed-off-by: John Stultz
    Acked-by: Alessandro Zummo
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-8-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • As part of addressing "y2038 problem" for in-kernel uses, this
    patch converts read_boot_clock() to read_boot_clock64() and
    read_persistent_clock() to read_persistent_clock64() using
    timespec64 by converting clock_access_fn to use timespec64.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Thierry Reding (for tegra part)
    Cc: Russell King
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-7-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • As part of addressing "y2038 problem" for in-kernel uses, this
    patch adds the y2038-safe tegra_read_persistent_clock64() using
    timespec64.

    Because we rely on some subsequent changes to convert arm
    multiarch support, tegra_read_persistent_clock() will be removed
    then.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Thierry Reding
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-6-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • As part of addressing "y2038 problem" for in-kernel uses, this
    patch adds the y2038-safe omap_read_persistent_clock64() using
    timespec64.

    Because we rely on some subsequent changes to convert arm
    multiarch support, omap_read_persistent_clock() will be removed
    then.

    Also remove the needless spinlock, because
    read_persistent_clock() doesn't run simultaneously.

    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Acked-by: Tony Lindgren
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-5-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • As part of addressing in-kernel y2038 issues, this patch adds
    update_persistent_clock64() and replaces all the call sites of
    update_persistent_clock() with this function. This is a __weak
    implementation, which simply calls the existing y2038 unsafe
    update_persistent_clock().

    This allows architecture specific implementations to be
    converted independently, and eventually y2038-unsafe
    update_persistent_clock() can be removed after all its
    architecture specific implementations have been converted to
    update_persistent_clock64().

    Suggested-by: Arnd Bergmann
    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-4-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • As part of addressing in-kernel y2038 issues, this patch adds
    read_persistent_clock64() and replaces all the call sites of
    read_persistent_clock() with this function. This is a __weak
    implementation, which simply calls the existing y2038 unsafe
    read_persistent_clock().

    This allows architecture specific implementations to be
    converted independently, and eventually the y2038 unsafe
    read_persistent_clock() can be removed after all its
    architecture specific implementations have been converted to
    read_persistent_clock64().

    Suggested-by: Arnd Bergmann
    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-3-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     
  • As part of addressing in-kernel y2038 issues, this patch adds
    read_boot_clock64() and replaces all the call sites of
    read_boot_clock() with this function. This is a __weak
    implementation, which simply calls the existing y2038 unsafe
    read_boot_clock().

    This allows architecture specific implementations to be
    converted independently, and eventually the y2038 unsafe
    read_boot_clock() can be removed after all its architecture
    specific implementations have been converted to
    read_boot_clock64().

    Suggested-by: Arnd Bergmann
    Signed-off-by: Xunlei Pang
    Signed-off-by: John Stultz
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1427945681-29972-2-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar

    Xunlei Pang
     

02 Apr, 2015

6 commits

  • Remove one CONFIG_HOTPLUG_CPU #ifdef in trade for introducing one
    CONFIG_SMP #ifdef.

    The CONFIG_SMP ifdef avoids declaring the per-CPU __tvec_bases storage
    on UP systems since they already have boot_tvec_bases.

    Also (re)add a runtime check on the base alignment -- for the paranoid
    amongst us :-)

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Viresh Kumar
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/fdd2d35e169bdc554ffa3fe77f77716298c75ada.1427814611.git.viresh.kumar@linaro.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • There is no need to call init_timers_cpu() on every CPU hotplug event,
    there is not much we need to reset.

    - Timer-lists are already empty at the end of migrate_timers().
    - timer_jiffies will be refreshed while adding a new timer, after the
    CPU is online again.
    - active_timers and all_timers can be reset from migrate_timers().

    Signed-off-by: Viresh Kumar
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/54a1c30ea7b805af55beb220cadf5a07a21b0a4d.1427814611.git.viresh.kumar@linaro.org
    Signed-off-by: Ingo Molnar

    Viresh Kumar
     
  • Memory for the 'tvec_base' array is allocated separately for the boot CPU (statically)
    and non-boot CPUs (dynamically).

    The reason is because __TIMER_INITIALIZER() needs to set ->base to a
    valid pointer (because we've made NULL special, hint: lock_timer_base())
    and we cannot get a compile time pointer to per-cpu entries because we
    don't know where we'll map the section, even for the boot cpu.

    This can be simplified a bit by statically allocating per-cpu memory.
    The only disadvantage is that memory for one of the structures will stay
    unused, i.e. for the boot CPU, which uses boot_tvec_bases.

    This will also guarantee that tvec_base is cacheline aligned. Even
    though tvec_base has ____cacheline_aligned stuck on, kzalloc_node() does
    not actually respect that (but guarantees a minimum u64 alignment).

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Viresh Kumar
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/17cdf560f2727f687ab159707d0aa591f8a2f82d.1427814611.git.viresh.kumar@linaro.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • It was found when doing a hotplug stress test on POWER, that the
    machine either hit softlockups or rcu_sched stall warnings. The
    issue was traced to commit:

    7cba160ad789 ("powernv/cpuidle: Redesign idle states management")

    which exposed the cpu_down() race with hrtimer based broadcast mode:

    5d1638acb9f6 ("tick: Introduce hrtimer based broadcast")

    The race is the following:

    Assume CPU1 is the CPU which holds the hrtimer broadcasting duty
    before it is taken down.

    CPU0 CPU1

    cpu_down() take_cpu_down()
    disable_interrupts()

    cpu_die()

    while (CPU1 != CPU_DEAD) {
    msleep(100);
    switch_to_idle();
    stop_cpu_timer();
    schedule_broadcast();
    }

    tick_cleanup_cpu_dead()
    take_over_broadcast()

    So after CPU1 disabled interrupts it cannot handle the broadcast
    hrtimer anymore, so CPU0 will be stuck forever.

    Fix this by explicitly taking over broadcast duty before cpu_die().

    This is a temporary workaround. What we really want is a callback
    in the clockevent device which allows us to do that from the dying
    CPU by pushing the hrtimer onto a different cpu. That might involve
    an IPI and is definitely more complex than this immediate fix.

    Changelog was picked up from:

    https://lkml.org/lkml/2015/2/16/213

    Suggested-by: Thomas Gleixner
    Tested-by: Nicolas Pitre
    Signed-off-by: Preeti U. Murthy
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: mpe@ellerman.id.au
    Cc: nicolas.pitre@linaro.org
    Cc: peterz@infradead.org
    Cc: rjw@rjwysocki.net
    Fixes: http://linuxppc.10917.n7.nabble.com/offlining-cpus-breakage-td88619.html
    Link: http://lkml.kernel.org/r/20150330092410.24979.59887.stgit@preeti.in.ibm.com
    [ Merged it to the latest timer tree, renamed the callback, tidied up the changelog. ]
    Signed-off-by: Ingo Molnar

    Preeti U Murthy
     
  • Do various cleanups on the clockchips.h file:

    - indent preprocessor blocks to make it more clear which block we are in,
    this also makes merge resolution easier

    - comment larger preprocessor blocks consistently, using the:

    #if FOO
    ...
    #else /* !FOO: */
    ...
    #endif /* !FOO */

    notation.

    - unbreak lines

    - etc.

    No change in functionality.

    Cc: Peter Zijlstra
    Cc: Rafael J. Wysocki
    Cc: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Move the broadcasting related section to the GENERIC_CLOCKEVENTS=y
    section - this also solves build failures on architectures that
    don't use generic clockevents yet.

    Also standardize include file style to make it easier to read, and
    use nesting depth aware preprocessor directives to make future merges
    easier.

    Cc: Peter Zijlstra
    Cc: Rafael J. Wysocki
    Cc: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

01 Apr, 2015

9 commits

  • Use the new tick_suspend/resume_local() and get rid of the
    homebrewn implementation of these in the ARM bL switcher. The
    check for the cpumask is completely pointless. There is no harm
    to suspend a per cpu tick device unconditionally. If that's a
    real issue then we fix it proper at the core level and not with
    some completely undocumented hacks in some random core code.

    Move the tick internals to the core code, now that this nuisance
    is gone.

    Signed-off-by: Thomas Gleixner
    [ rjw: Rebase, changelog ]
    Signed-off-by: Rafael J. Wysocki
    Cc: Nicolas Pitre
    Cc: Peter Zijlstra
    Cc: Russell King
    Link: http://lkml.kernel.org/r/1655112.Ws17YsMfN7@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Xen calls on every cpu into tick_resume() which is just wrong.
    tick_resume() is for the syscore global suspend/resume
    invocation. What XEN really wants is a per cpu local resume
    function.

    Provide a tick_resume_local() function and use it in XEN.

    Also provide a complementary tick_suspend_local() and modify
    tick_unfreeze() and tick_freeze(), respectively, to use the
    new local tick resume/suspend functions.

    Signed-off-by: Thomas Gleixner
    [ Combined two patches, rebased, modified subject/changelog. ]
    Signed-off-by: Rafael J. Wysocki
    Cc: Boris Ostrovsky
    Cc: David Vrabel
    Cc: Konrad Rzeszutek Wilk
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1698741.eezk9tnXtG@vostro.rjw.lan
    [ Merged to latest timers/core. ]
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Solely used in tick-broadcast.c and the return value is
    hardcoded 0. Make it static and void.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1689058.QkHYDJSRKu@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • clockevents_notify() is a leftover from the early design of the
    clockevents facility. It's really not a notification mechanism,
    it's a multiplex call.

    We are way better off to have explicit calls instead of this
    monstrosity. Split out the suspend/resume() calls and invoke
    them directly from the call sites.

    No locking required at this point because these calls happen
    with interrupts disabled and a single cpu online.

    Signed-off-by: Thomas Gleixner
    [ Rebased on top of 4.0-rc5. ]
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/713674030.jVm1qaHuPf@vostro.rjw.lan
    [ Rebased on top of latest timers/core. ]
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Called with 'clockevents_lock' held and interrupts disabled
    already.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/51005827.yXt5tjZMBs@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • No point to expose everything to the world. People just believe
    such functions can be abused for whatever purposes. Sigh.

    Signed-off-by: Thomas Gleixner
    [ Rebased on top of 4.0-rc5 ]
    Signed-off-by: Rafael J. Wysocki
    Cc: Nicolas Pitre
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/28017337.VbCUc39Gme@vostro.rjw.lan
    [ Merged to latest timers/core ]
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • tick-internal.h is pretty confusing as a lot of the stub inlines
    are there several times.

    Distangle the maze and make clear functional sections.

    Signed-off-by: Thomas Gleixner
    [ rjw: Subject ]
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/16068264.vcNp79HLaT@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Move clocksource related stuff to timekeeping.h and remove the
    pointless include from ntp.c

    Signed-off-by: Thomas Gleixner
    [ rjw: Subject ]
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/2714218.nM5AEfAHj0@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • This option was for simpler migration to the clock events code.
    Most architectures have been converted and the option has been
    disfunctional as a standalone option for quite some time. Remove
    it.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/5021859.jl9OC1medj@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

31 Mar, 2015

2 commits

  • The parent clock of the sun5i timer is the AHB clock, which rate
    might change because of other devices requirements.

    This is for example the case on the Allwinner A31, where the DMA
    controller needs a minimum rate higher than the default, that is
    enforced after the timer driver has probed.

    Add clock notifiers to make sure we reflect the clock rate
    changes in the timer rates.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1427796746-373-5-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Ingo Molnar

    Maxime Ripard
     
  • Refactor the code in order to remove the global variables and
    split the clock source and clock events registration in order to
    ease the addition of the clock notifiers needed to handle the
    parent clock rate changes.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1427796746-373-4-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Ingo Molnar

    Maxime Ripard