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
     
  • The init functions do not return any error. They behave as the following:

    - panic, thus leading to a kernel crash while another timer may work and
    make the system boot up correctly

    or

    - print an error and let the caller unaware if the state of the system

    Change that by converting the init functions to return an error conforming
    to the CLOCKSOURCE_OF_RET prototype.

    Proper error handling (rollback, errno value) will be changed later case
    by case, thus this change just return back an error or success in the init
    function.

    Signed-off-by: Daniel Lezcano

    Daniel Lezcano
     

12 Jan, 2016

2 commits

  • ….linaro.org/people/daniel.lezcano/linux into timers/urgent

    Pull in fixes from Daniel Lezcano:

    - Fix the vt8500 timer leading to a system lock up when dealing with too
    small delta (Roman Volkov)

    - Select the CLKSRC_MMIO when the fsl_ftm_timer is enabled with COMPILE_TEST
    (Daniel Lezcano)

    - Prevent to compile timers using the 'iomem' API when the architecture has
    not HAS_IOMEM set (Richard Weinberger)

    Thomas Gleixner
     
  • The vt8500 clocksource driver declares itself as capable to handle the
    minimum delay of 4 cycles by passing the value into
    clockevents_config_and_register(). The vt8500_timer_set_next_event()
    requires the passed cycles value to be at least 16. The impact is that
    userspace hangs in nanosleep() calls with small delay intervals.

    This problem is reproducible in Linux 4.2 starting from:
    c6eb3f70d448 ('hrtimer: Get rid of hrtimer softirq')

    From Russell King, more detailed explanation:

    "It's a speciality of the StrongARM/PXA hardware. It takes a certain
    number of OSCR cycles for the value written to hit the compare registers.
    So, if a very small delta is written (eg, the compare register is written
    with a value of OSCR + 1), the OSCR will have incremented past this value
    before it hits the underlying hardware. The result is, that you end up
    waiting a very long time for the OSCR to wrap before the event fires.

    So, we introduce a check in set_next_event() to detect this and return
    -ETIME if the calculated delta is too small, which causes the generic
    clockevents code to retry after adding the min_delta specified in
    clockevents_config_and_register() to the current time value.

    min_delta must be sufficient that we don't re-trip the -ETIME check - if
    we do, we will return -ETIME, forward the next event time, try to set it,
    return -ETIME again, and basically lock the system up. So, min_delta
    must be larger than the check inside set_next_event(). A factor of two
    was chosen to ensure that this situation would never occur.

    The PXA code worked on PXA systems for years, and I'd suggest no one
    changes this mechanism without access to a wide range of PXA systems,
    otherwise they're risking breakage."

    Cc: stable@vger.kernel.org
    Cc: Russell King
    Acked-by: Alexey Charkov
    Signed-off-by: Roman Volkov
    Signed-off-by: Daniel Lezcano

    Roman Volkov
     

15 Dec, 2015

1 commit


10 Aug, 2015

1 commit


11 Dec, 2013

1 commit


02 Oct, 2013

1 commit


28 Mar, 2013

1 commit


11 Mar, 2013

1 commit

  • In cases where we have multiple nodes of the same type, we may need the
    node pointer to know which node was matched. Passing the node pointer
    also keeps the init function from having to match the node a 2nd time.

    Update bcm2835, vt8500, and tegra20 init functions for the new function
    prototype. Further tegra20 clean-ups are in follow-up commit.

    Signed-off-by: Rob Herring
    Cc: John Stultz
    Cc: Thomas Gleixner
    Reviewed-by: Stephen Warren
    Tested-by: Stephen Warren
    Acked-by: Arnd Bergmann
    Acked-by: Tony Prisk
    Tested-by: Michal Simek

    Rob Herring
     

16 Jan, 2013

2 commits


15 Jan, 2013

1 commit


14 Jan, 2013

1 commit