Skip to content
Permalink
Chunyan-Zhang/…
Switch branches/tags

Commits on Jul 15, 2021

  1. clocksource/drivers/sprd: Add module support to Unisoc timer

    Timers still have devices created for them. So, when compiling a timer
    driver as a module, implement it as a normal platform device driver.
    
    Original-by: Baolin Wang <baolin.wang7@gmail.com>
    Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
    lyrazhang authored and intel-lab-lkp committed Jul 15, 2021
  2. clocksource/drivers/timer-of: Add boilerplate macros for timer module…

    … driver
    
    To support module build, platform driver structs, .probe(), match table and
    module macros need to be added to the timer driver. So this patch provides
    a few macros to take care of these things, and that would reduce the repeat
    code lines in every sigle driver.
    
    Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
    lyrazhang authored and intel-lab-lkp committed Jul 15, 2021
  3. drivers/clocksource/timer-of: Remove __init markings

    This allows timer drivers to be compiled as modules.
    
    Signed-off-by: Saravana Kannan <saravanak@google.com>
    Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
    Saravana Kannan authored and intel-lab-lkp committed Jul 15, 2021

Commits on Jun 28, 2021

  1. time/kunit: Add missing MODULE_LICENSE()

    [ mingo: MODULE_LICENSE() takes a string. ]
    
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Thomas Gleixner authored and Ingo Molnar committed Jun 28, 2021

Commits on Jun 24, 2021

  1. time: Improve performance of time64_to_tm()

    The current implementation of time64_to_tm() contains unnecessary loops,
    branches and look-up tables. The new one uses an arithmetic-based algorithm
    appeared in [1] and is approximately 3x faster (YMMV).
    
    The drawback is that the new code isn't intuitive and contains many 'magic
    numbers' (not unusual for this type of algorithm). However, [1] justifies
    all those numbers and, given this function's history, the code is unlikely
    to need much maintenance, if any at all.
    
    Add a KUnit test for it which checks every day in a 160,000 years interval
    centered at 1970-01-01 against the expected result.
    
    [1] Neri, Schneider, "Euclidean Affine Functions and Applications to
    Calendar Algorithms". https://arxiv.org/abs/2102.06959
    
    Signed-off-by: Cassio Neri <cassio.neri@gmail.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210622213616.313046-1-cassio.neri@gmail.com
    cassioneri authored and Thomas Gleixner committed Jun 24, 2021

Commits on Jun 22, 2021

  1. clockevents: Use list_move() instead of list_del()/list_add()

    Simplify the code.
    
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Baokun Li <libaokun1@huawei.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210609070242.1322450-1-libaokun1@huawei.com
    Baokun Li authored and Thomas Gleixner committed Jun 22, 2021
  2. clocksource: Print deviation in nanoseconds when a clocksource become…

    …s unstable
    
    Currently when an unstable clocksource is detected, the raw counters of
    that clocksource and watchdog will be printed, which can only be understood
    after some math calculation.
    
    So print the delta in nanoseconds as well to make it easier for humans to
    check the results.
    
    [ paulmck: Fix typo. ]
    
    Signed-off-by: Feng Tang <feng.tang@intel.com>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210527190124.440372-6-paulmck@kernel.org
    ftang1 authored and Thomas Gleixner committed Jun 22, 2021
  3. clocksource: Provide kernel module to test clocksource watchdog

    When the clocksource watchdog marks a clock as unstable, this might
    be due to that clock being unstable or it might be due to delays that
    happen to occur between the reads of the two clocks.  It would be good
    to have a way of testing the clocksource watchdog's ability to
    distinguish between these two causes of clock skew and instability.
    
    Therefore, provide a new clocksource-wdtest module selected by a new
    TEST_CLOCKSOURCE_WATCHDOG Kconfig option.  This module has a single module
    parameter named "holdoff" that provides the number of seconds of delay
    before testing should start, which defaults to zero when built as a module
    and to 10 seconds when built directly into the kernel.  Very large systems
    that boot slowly may need to increase the value of this module parameter.
    
    This module uses hand-crafted clocksource structures to do its testing,
    thus avoiding messing up timing for the rest of the kernel and for user
    applications.  This module first verifies that the ->uncertainty_margin
    field of the clocksource structures are set sanely.  It then tests the
    delay-detection capability of the clocksource watchdog, increasing the
    number of consecutive delays injected, first provoking console messages
    complaining about the delays and finally forcing a clock-skew event.
    Unexpected test results cause at least one WARN_ON_ONCE() console splat.
    If there are no splats, the test has passed.  Finally, it fuzzes the
    value returned from a clocksource to test the clocksource watchdog's
    ability to detect time skew.
    
    This module checks the state of its clocksource after each test, and
    uses WARN_ON_ONCE() to emit a console splat if there are any failures.
    This should enable all types of test frameworks to detect any such
    failures.
    
    This facility is intended for diagnostic use only, and should be avoided
    on production systems.
    
    Reported-by: Chris Mason <clm@fb.com>
    Suggested-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Tested-by: Feng Tang <feng.tang@intel.com>
    Link: https://lore.kernel.org/r/20210527190124.440372-5-paulmck@kernel.org
    paulmckrcu authored and Thomas Gleixner committed Jun 22, 2021
  4. clocksource: Reduce clocksource-skew threshold

    Currently, WATCHDOG_THRESHOLD is set to detect a 62.5-millisecond skew in
    a 500-millisecond WATCHDOG_INTERVAL.  This requires that clocks be skewed
    by more than 12.5% in order to be marked unstable.  Except that a clock
    that is skewed by that much is probably destroying unsuspecting software
    right and left.  And given that there are now checks for false-positive
    skews due to delays between reading the two clocks, it should be possible
    to greatly decrease WATCHDOG_THRESHOLD, at least for fine-grained clocks
    such as TSC.
    
    Therefore, add a new uncertainty_margin field to the clocksource structure
    that contains the maximum uncertainty in nanoseconds for the corresponding
    clock.  This field may be initialized manually, as it is for
    clocksource_tsc_early and clocksource_jiffies, which is copied to
    refined_jiffies.  If the field is not initialized manually, it will be
    computed at clock-registry time as the period of the clock in question
    based on the scale and freq parameters to __clocksource_update_freq_scale()
    function.  If either of those two parameters are zero, the
    tens-of-milliseconds WATCHDOG_THRESHOLD is used as a cowardly alternative
    to dividing by zero.  No matter how the uncertainty_margin field is
    calculated, it is bounded below by twice WATCHDOG_MAX_SKEW, that is, by 100
    microseconds.
    
    Note that manually initialized uncertainty_margin fields are not adjusted,
    but there is a WARN_ON_ONCE() that triggers if any such field is less than
    twice WATCHDOG_MAX_SKEW.  This WARN_ON_ONCE() is intended to discourage
    production use of the one-nanosecond uncertainty_margin values that are
    used to test the clock-skew code itself.
    
    The actual clock-skew check uses the sum of the uncertainty_margin fields
    of the two clocksource structures being compared.  Integer overflow is
    avoided because the largest computed value of the uncertainty_margin
    fields is one billion (10^9), and double that value fits into an
    unsigned int.  However, if someone manually specifies (say) UINT_MAX,
    they will get what they deserve.
    
    Note that the refined_jiffies uncertainty_margin field is initialized to
    TICK_NSEC, which means that skew checks involving this clocksource will
    be sufficently forgiving.  In a similar vein, the clocksource_tsc_early
    uncertainty_margin field is initialized to 32*NSEC_PER_MSEC, which
    replicates the current behavior and allows custom setting if needed
    in order to address the rare skews detected for this clocksource in
    current mainline.
    
    Suggested-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Feng Tang <feng.tang@intel.com>
    Link: https://lore.kernel.org/r/20210527190124.440372-4-paulmck@kernel.org
    paulmckrcu authored and Thomas Gleixner committed Jun 22, 2021
  5. clocksource: Limit number of CPUs checked for clock synchronization

    Currently, if skew is detected on a clock marked CLOCK_SOURCE_VERIFY_PERCPU,
    that clock is checked on all CPUs.  This is thorough, but might not be
    what you want on a system with a few tens of CPUs, let alone a few hundred
    of them.
    
    Therefore, by default check only up to eight randomly chosen CPUs.  Also
    provide a new clocksource.verify_n_cpus kernel boot parameter.  A value of
    -1 says to check all of the CPUs, and a non-negative value says to randomly
    select that number of CPUs, without concern about selecting the same CPU
    multiple times.  However, make use of a cpumask so that a given CPU will be
    checked at most once.
    
    Suggested-by: Thomas Gleixner <tglx@linutronix.de> # For verify_n_cpus=1.
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Feng Tang <feng.tang@intel.com>
    Link: https://lore.kernel.org/r/20210527190124.440372-3-paulmck@kernel.org
    paulmckrcu authored and Thomas Gleixner committed Jun 22, 2021
  6. clocksource: Check per-CPU clock synchronization when marked unstable

    Some sorts of per-CPU clock sources have a history of going out of
    synchronization with each other.  However, this problem has purportedy been
    solved in the past ten years.  Except that it is all too possible that the
    problem has instead simply been made less likely, which might mean that
    some of the occasional "Marking clocksource 'tsc' as unstable" messages
    might be due to desynchronization.  How would anyone know?
    
    Therefore apply CPU-to-CPU synchronization checking to newly unstable
    clocksource that are marked with the new CLOCK_SOURCE_VERIFY_PERCPU flag.
    Lists of desynchronized CPUs are printed, with the caveat that if it
    is the reporting CPU that is itself desynchronized, it will appear that
    all the other clocks are wrong.  Just like in real life.
    
    Reported-by: Chris Mason <clm@fb.com>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Feng Tang <feng.tang@intel.com>
    Link: https://lore.kernel.org/r/20210527190124.440372-2-paulmck@kernel.org
    paulmckrcu authored and Thomas Gleixner committed Jun 22, 2021
  7. clocksource: Retry clock read if long delays detected

    When the clocksource watchdog marks a clock as unstable, this might be due
    to that clock being unstable or it might be due to delays that happen to
    occur between the reads of the two clocks.  Yes, interrupts are disabled
    across those two reads, but there are no shortage of things that can delay
    interrupts-disabled regions of code ranging from SMI handlers to vCPU
    preemption.  It would be good to have some indication as to why the clock
    was marked unstable.
    
    Therefore, re-read the watchdog clock on either side of the read from the
    clock under test.  If the watchdog clock shows an excessive time delta
    between its pair of reads, the reads are retried.
    
    The maximum number of retries is specified by a new kernel boot parameter
    clocksource.max_cswd_read_retries, which defaults to three, that is, up to
    four reads, one initial and up to three retries.  If more than one retry
    was required, a message is printed on the console (the occasional single
    retry is expected behavior, especially in guest OSes).  If the maximum
    number of retries is exceeded, the clock under test will be marked
    unstable.  However, the probability of this happening due to various sorts
    of delays is quite small.  In addition, the reason (clock-read delays) for
    the unstable marking will be apparent.
    
    Reported-by: Chris Mason <clm@fb.com>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Feng Tang <feng.tang@intel.com>
    Link: https://lore.kernel.org/r/20210527190124.440372-1-paulmck@kernel.org
    paulmckrcu authored and Thomas Gleixner committed Jun 22, 2021
  8. clockevents: Add missing parameter documentation

    Add the missing documentation for the @cpu parameter of
    tick_cleanup_dead_cpu().
    
    Signed-off-by: Baokun Li <libaokun1@huawei.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210608024305.2750999-1-libaokun1@huawei.com
    Baokun Li authored and Thomas Gleixner committed Jun 22, 2021

Commits on Jun 18, 2021

  1. Merge tag 'timers-v5.14' of https://git.linaro.org/people/daniel.lezc…

    …ano/linux into timers/core
    
    Pull clockevent/source updates from Daniel Lezcano:
    
     - Remove arch_timer_rate1 variable as it is unused in the architected
       ARM timer (Jisheng Zhang)
    
     - Minor cleanups (whitespace, constification, ...) for the Samsung pwm
       timer (Krzysztof Kozlowski)
    
     - Acknowledge and disable the timer interrupt at suspend time to
       prevent the suspend to be aborted by the ATF if there is a pending
       one on the Mediatek timer (Evan Benn)
    
     - Save and restore the configuration register at suspend/resume time
       for TI dm timer (Tony Lindgren)
    
     - Set the scene for the next timers support by renaming the array
       variables on the Ingenic time (Zhou Yanjie)
    
     - Add the clock rate change notification to adjust the prescalar value
       and compensate the clock source on the ARM global timer (Andrea
       Merello)
    
     - Add missing variable static annotation on the ARM global timer (Zou
       Wei)
    
     - Remove a duplicate argument when building the bits field on the ARM
       global timer (Wan Jiabing)
    
     - Improve the timer workaround function by reducing the loop on the
       Allwinner A64 timer (Samuel Holland)
    
     - Do no restore the register context in case of error on the TI dm
       timer (Tony Lindgren)
    
    Link: https://lore.kernel.org/r/65ed5f60-d7a5-b4ae-ff78-0382d4671cc5@linaro.org
    Thomas Gleixner committed Jun 18, 2021

Commits on Jun 16, 2021

  1. clocksource/drivers/timer-ti-dm: Drop unnecessary restore

    The device is not losing context on CPU_CLUSTER_PM_ERROR. As we are only
    saving and restoring context with cpu_pm, there is no need to restore the
    context in case of an error.
    
    Note that the unnecessary restoring of context does not cause issues, it's
    just not needed.
    
    Cc: Lokesh Vutla <lokeshvutla@ti.com>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210518075306.35532-1-tony@atomide.com
    tmlind authored and dlezcano committed Jun 16, 2021
  2. clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround

    Bad counter reads are experienced sometimes when bit 10 or greater rolls
    over. Originally, testing showed that at least 10 lower bits would be
    set to the same value during these bad reads. However, some users still
    reported time skips.
    
    Wider testing revealed that on some chips, occasionally only the lowest
    9 bits would read as the anomalous value. During these reads (which
    still happen only when bit 10), bit 9 would read as the correct value.
    
    Reduce the mask by one bit to cover these cases as well.
    
    Cc: stable@vger.kernel.org
    Fixes: c950ca8 ("clocksource/drivers/arch_timer: Workaround for Allwinner A64 timer instability")
    Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
    Signed-off-by: Samuel Holland <samuel@sholland.org>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210515021439.55316-1-samuel@sholland.org
    smaeul authored and dlezcano committed Jun 16, 2021
  3. clocksource/drivers/arm_global_timer: Remove duplicated argument in a…

    …rm_global_timer
    
    Fix the following coccicheck warning:
    
        drivers/clocksource/arm_global_timer.c:107:4-23:
        duplicated argument to & or |
    
    Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
    Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210615115440.8881-1-wanjiabing@vivo.com
    Wan Jiabing authored and dlezcano committed Jun 16, 2021
  4. clocksource/drivers/arm_global_timer: Make symbol 'gt_clk_rate_change…

    …_nb' static
    
    The sparse tool complains as follows:
    
    drivers/clocksource/arm_global_timer.c:54:23: warning:
     symbol 'gt_clk_rate_change_nb' was not declared. Should it be static?
    
    This symbol is not used outside of arm_global_timer.c, so mark it static.
    
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zou Wei <zou_wei@huawei.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/1623490046-37972-1-git-send-email-zou_wei@huawei.com
    SamuelZOU authored and dlezcano committed Jun 16, 2021
  5. arm: zynq: don't disable CONFIG_ARM_GLOBAL_TIMER due to CONFIG_CPU_FR…

    …EQ anymore
    
    Now ARM global timer driver could work even if it's source clock rate
    changes, so we don't need to disable that driver when cpu frequency scaling
    is in use.
    
    This cause Zynq arch to get support for timer delay and get_cycles().
    
    Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
    Cc: Patrice Chotard <patrice.chotard@st.com>
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Michal Simek <michal.simek@xilinx.com>
    Cc: Sören Brinkmann <soren.brinkmann@xilinx.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210406130045.15491-3-andrea.merello@gmail.com
    andreamerello authored and dlezcano committed Jun 16, 2021
  6. clocksource/drivers/arm_global_timer: Implement rate compensation whe…

    …never source clock changes
    
    This patch adds rate change notification support for the parent clock;
    should that clock change, then we try to adjust the our prescaler in order
    to compensate (i.e. we adjust to still get the same timer frequency).
    
    This is loosely based on what it's done in timer-cadence-ttc. timer-sun51,
    mips-gic-timer and smp_twd.c also seem to look at their parent clock rate
    and to perform some kind of adjustment whenever needed.
    
    In this particular case we have only one single counter and prescaler for
    all clocksource, clockevent and timer_delay, and we just update it for all
    (i.e. we don't let it go and call clockevents_update_freq() to notify to
    the kernel that our rate has changed).
    
    Note that, there is apparently no other way to fixup things, because once
    we call register_current_timer_delay(), specifying the timer rate, it seems
    that that rate is not supposed to change ever.
    
    In order for this mechanism to work, we have to make assumptions about how
    much the initial clock is supposed to eventually decrease from the initial
    one, and set our initial prescaler to a value that we can eventually
    decrease enough to compensate. We provide an option in KConfig for this.
    
    In case we end up in a situation in which we are not able to compensate the
    parent clock change, we fail returning NOTIFY_BAD.
    
    This fixes a real-world problem with Zynq arch not being able to use this
    driver and CPU_FREQ at the same time (because ARM global timer is fed by
    the CPU clock, which may keep changing when CPU_FREQ is enabled).
    
    Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
    Cc: Patrice Chotard <patrice.chotard@st.com>
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Michal Simek <michal.simek@xilinx.com>
    Cc: Sören Brinkmann <soren.brinkmann@xilinx.com>
    Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210406130045.15491-2-andrea.merello@gmail.com
    andreamerello authored and dlezcano committed Jun 16, 2021

Commits on Jun 15, 2021

  1. clocksource/drivers/ingenic: Rename unreasonable array names

    1.Rename the "ingenic_ost_clk_info[]" to "x1000_ost_clk_info[]" to
      facilitate the addition of OST support for X2000 SoC in a later
      commit
    
    2.When the OST support for X2000 SoC is added, there will be two
      compatible strings, so renaming "ingenic_ost_of_match[]" to
      "ingenic_ost_of_matches[]" is more reasonable
    
    3.Remove the unnecessary comma in "ingenic_ost_of_matches[]" to reduce
      code size as much as possible.
    
    Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/1622824306-30987-2-git-send-email-zhouyanjie@wanyeetech.com
    XBurst authored and dlezcano committed Jun 15, 2021
  2. clocksource/drivers/timer-ti-dm: Save and restore timer TIOCP_CFG

    As we are using cpu_pm to save and restore context, we must also save and
    restore the timer sysconfig register TIOCP_CFG. This is needed because
    we are not calling PM runtime functions at all with cpu_pm.
    
    Fixes: b34677b ("clocksource/drivers/timer-ti-dm: Implement cpu_pm notifier for context save and restore")
    Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
    Cc: Adam Ford <aford173@gmail.com>
    Cc: Andreas Kemnade <andreas@kemnade.info>
    Cc: Lokesh Vutla <lokeshvutla@ti.com>
    Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210415085506.56828-1-tony@atomide.com
    tmlind authored and dlezcano committed Jun 15, 2021
  3. clocksource/drivers/mediatek: Ack and disable interrupts on suspend

    Interrupts are disabled during suspend before this driver disables its
    timers. ARM trusted firmware will abort suspend if the timer irq is
    pending, so ack and disable the timer interrupt during suspend.
    
    Signed-off-by: Evan Benn <evanbenn@chromium.org>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210512122528.v4.1.I1d9917047de06715da16e1620759f703fcfdcbcb@changeid
    Evan Benn authored and dlezcano committed Jun 15, 2021

Commits on Jun 4, 2021

  1. clocksource/drivers/samsung_pwm: Constify source IO memory

    The 'source_reg' IO memory is only read, so the pointer can point to
    const for safety.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210506202729.157260-4-krzysztof.kozlowski@canonical.com
    krzk authored and dlezcano committed Jun 4, 2021
  2. clocksource/drivers/samsung_pwm: Cleanup on init error

    Failure of timer initialization is likely to be fatal for the system, so
    cleanup in such case is not strictly necessary.  However the code might
    be refactored or reused, so better not to rely on such assumption that
    system won't continue init failure.
    
    Unmap the IO memory and put the clock on initialization failures from
    devicetree.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210506202729.157260-3-krzysztof.kozlowski@canonical.com
    krzk authored and dlezcano committed Jun 4, 2021
  3. clocksource/drivers/samsung_pwm: Constify passed structure

    The 'struct samsung_pwm_variant' argument passed to initialization
    functions is not modified, so it can be made const for safety.
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210506202729.157260-2-krzysztof.kozlowski@canonical.com
    krzk authored and dlezcano committed Jun 4, 2021
  4. clocksource/drivers/samsung_pwm: Minor whitespace cleanup

    Cleanup the code to be slightly more readable and follow coding
    convention - only whitespace.  This fixes checkpatch warnings:
    
      WARNING: Block comments should align the * on each line
      WARNING: please, no space before tabs
      WARNING: Missing a blank line after declarations
      CHECK: Alignment should match open parenthesis
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210506202729.157260-1-krzysztof.kozlowski@canonical.com
    krzk authored and dlezcano committed Jun 4, 2021

Commits on Jun 3, 2021

  1. clocksource/drivers/arm_arch_timer: Remove arch_timer_rate1

    This variable is added by my mistake, it's not used at all.
    
    Fixes: e2bf384 ("clocksource/drivers/arm_arch_timer: Add __ro_after_init and __init")
    Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Acked-by: Marc Zyngier <maz@kernel.org>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20210511154856.6afbcb65@xhacker.debian
    Jisheng Zhang authored and dlezcano committed Jun 3, 2021

Commits on May 31, 2021

  1. timer_list: Print name of per-cpu wakeup device

    With the introduction of per-cpu wakeup devices that can be used in
    preference to the broadcast timer, print the name of such devices when
    they are available.
    
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210524221818.15850-6-will@kernel.org
    willdeacon authored and Thomas Gleixner committed May 31, 2021
  2. tick/broadcast: Program wakeup timer when entering idle if required

    When configuring the broadcast timer on entry to and exit from deep idle
    states, prefer a per-CPU wakeup timer if one exists.
    
    On entry to idle, stop the tick device and transfer the next event into
    the oneshot wakeup device, which will serve as the wakeup from idle. To
    avoid the overhead of additional hardware accesses on exit from idle,
    leave the timer armed and treat the inevitable interrupt as a (possibly
    spurious) tick event.
    
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210524221818.15850-5-will@kernel.org
    willdeacon authored and Thomas Gleixner committed May 31, 2021
  3. tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast

    Some SoCs have two per-cpu timer implementations where the timer with the
    higher rating stops in deep idle (i.e. suffers from CLOCK_EVT_FEAT_C3STOP)
    but is otherwise preferable to the timer with the lower rating. In such a
    design, selecting the higher rated devices relies on a global broadcast
    timer and IPIs to wake up from deep idle states.
    
    To avoid the reliance on a global broadcast timer and also to reduce the
    overhead associated with the IPI wakeups, extend
    tick_install_broadcast_device() to manage per-cpu wakeup timers separately
    from the broadcast device.
    
    For now, these timers remain unused.
    
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210524221818.15850-4-will@kernel.org
    willdeacon authored and Thomas Gleixner committed May 31, 2021
  4. tick/broadcast: Split __tick_broadcast_oneshot_control() into a helper

    In preparation for adding support for per-cpu wakeup timers, split
    _tick_broadcast_oneshot_control() into a helper function which deals
    only with the broadcast timer management across idle transitions.
    
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210524221818.15850-3-will@kernel.org
    willdeacon authored and Thomas Gleixner committed May 31, 2021
  5. tick/broadcast: Drop unneeded CONFIG_GENERIC_CLOCKEVENTS_BROADCAST guard

    tick-broadcast.o is only built if CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
    so remove the redundant #ifdef guards around the definition of
    tick_receive_broadcast().
    
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210524221818.15850-2-will@kernel.org
    willdeacon authored and Thomas Gleixner committed May 31, 2021
  6. clockevents: Use DEVICE_ATTR_[RO|WO] macros

    Use the DEVICE_ATTR_[RO|WO] helpers instead of plain DEVICE_ATTR, which
    makes the code a bit shorter and easier to read.
    
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20210523065825.19684-1-yuehaibing@huawei.com
    YueHaibing authored and Thomas Gleixner committed May 31, 2021

Commits on May 30, 2021

  1. Linux 5.13-rc4

    torvalds committed May 30, 2021
Older