17 Jan, 2017

1 commit

  • When a CPU goes offline a potentially pending timer interrupt is not
    cleared. When the CPU comes online again then the pending interrupt is
    delivered before the per cpu clockevent device is initialized. As a
    consequence the tick interrupt handler dereferences a NULL pointer.

    [ 51.251378] Unable to handle kernel NULL pointer dereference at virtual address 00000040
    [ 51.289348] task: ee942d00 task.stack: ee960000
    [ 51.293861] PC is at tick_periodic+0x38/0xb0
    [ 51.298102] LR is at tick_handle_periodic+0x1c/0x90

    Clear the pending interrupt in the cpu dying path.

    Fixes: 56a94f13919c ("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier")
    Reported-by: Seung-Woo Kim
    Signed-off-by: Joonyoung Shim
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: cw00.choi@samsung.com
    Cc: daniel.lezcano@linaro.org
    Cc: stable@vger.kernel.org
    Cc: javier@osg.samsung.com
    Cc: kgene@kernel.org
    Cc: krzk@kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1484628876-22065-1-git-send-email-jy0922.shim@samsung.com
    Signed-off-by: Thomas Gleixner

    Joonyoung Shim
     

26 Dec, 2016

1 commit

  • Pull timer type cleanups from Thomas Gleixner:
    "This series does a tree wide cleanup of types related to
    timers/timekeeping.

    - Get rid of cycles_t and use a plain u64. The type is not really
    helpful and caused more confusion than clarity

    - Get rid of the ktime union. The union has become useless as we use
    the scalar nanoseconds storage unconditionally now. The 32bit
    timespec alike storage got removed due to the Y2038 limitations
    some time ago.

    That leaves the odd union access around for no reason. Clean it up.

    Both changes have been done with coccinelle and a small amount of
    manual mopping up"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    ktime: Get rid of ktime_equal()
    ktime: Cleanup ktime_set() usage
    ktime: Get rid of the union
    clocksource: Use a plain u64 instead of cycle_t

    Linus Torvalds
     

25 Dec, 2016

2 commits

  • There is no point in having an extra type for extra confusion. u64 is
    unambiguous.

    Conversion was done with the following coccinelle script:

    @rem@
    @@
    -typedef u64 cycle_t;

    @fix@
    typedef cycle_t;
    @@
    -cycle_t
    +u64

    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: John Stultz

    Thomas Gleixner
     
  • When the state names got added a script was used to add the extra argument
    to the calls. The script basically converted the state constant to a
    string, but the cleanup to convert these strings into meaningful ones did
    not happen.

    Replace all the useless strings with 'subsys/xxx/yyy:state' strings which
    are used in all the other places already.

    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Sebastian Siewior
    Link: http://lkml.kernel.org/r/20161221192112.085444152@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

19 Dec, 2016

1 commit

  • If of_iomap() or any other subsequent function fails moxart_timer_init()
    exits without freeing memory and unmapping the timer base.

    Add proper cleanup points.

    Signed-off-by: Sudip Mukherjee
    Cc: Daniel Lezcano
    Cc: Sudip Mukherjee
    Link: http://lkml.kernel.org/r/1482099996-1524-1-git-send-email-sudipm.mukherjee@gmail.com
    Signed-off-by: Thomas Gleixner

    Sudip Mukherjee
     

16 Dec, 2016

2 commits

  • Pull ARM SoC platform updates from Arnd Bergmann:
    "These are updates for platform specific code on 32-bit ARM machines,
    essentially anything that can not (yet) be expressed using DT files.

    Noteworthy changes include:

    - Added support for the TI DRA71x family of SoCs in mach-omap2, this
    is an new variant of the the DRA72x/DRA74x automotive infotainment
    chips we already supported for a while.

    - Added support for the ST STM32F746 SoC, the first Cortex-M7 based
    microcontroller we support, related to the smaller STM32F4 family.

    - Renesas adds support for r8a7743 and r8a7745 in mach-shmobile, see
    http://elinux.org/RZ-G

    - SMP is now supported on the OX820 platform

    - A lot of code in mach-omap2 gets removed as a follow-up to removing
    support for board files in the previous release

    - Davinci has some new work to improve USB support

    - For i.MX, the performance monitor now supports profiling the memory
    controller using 'perf'"

    * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (95 commits)
    ARM: davinci: da830-evm: use gpio descriptor for mmc pins
    ARM: davinci: da850-evm: use gpio descriptor for mmc pins
    ARM: davinci: hawk: use gpio descriptor for mmc pins
    ARM: ARTPEC-6: add select MFD_SYSCON to MACH_ARTPEC6
    ARM: davinci: da8xx: Fix ohci device name
    ARM: oxnas: Add OX820 config and makefile entry
    ARM: oxnas: Add OX820 SMP support
    ARM: davinci: PM: fix build when da850 not compiled in
    ARM: orion5x: remove legacy support of ls-chl
    ARM: integrator: drop EBI access use syscon
    ARM: BCM5301X: Add back handler ignoring external imprecise aborts
    ARM: davinci: PM: support da8xx DT platforms
    ARM: davinci: PM: cleanup: remove references to pdata
    ARM: davinci: PM: rework init, remove platform device
    ARM: Kconfig: Introduce MACH_STM32F746 flag
    ARM: mach-stm32: Add a new SOC - STM32F746
    ARM: shmobile: document SK-RZG1E board
    ARM: shmobile: r8a7745: basic SoC support
    ARM: imx: mach-imx6ul: add imx6ull support
    ARM: zynq: Reserve correct amount of non-DMA RAM
    ...

    Linus Torvalds
     
  • Pull ARC updates from Vineet Gupta:
    "These are mostly timer/clocksource driver updates which were
    Reviewed/Acked by Daniel but had to be merged via ARC tree due to
    dependencies.

    I will follow up with another pull request with actual ARC changes
    early next week !

    Summary:

    - Moving ARC timer driver into drivers/clocksource

    - EZChip timer driver updates [Noam]

    - ARC AXS103 and HAPS platform updates [Alexey]"

    * tag 'arc-4.10-rc1-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
    ARC: axs10x: really enable ARC PGU
    ARC: rename Zebu platform support to HAPS
    clocksource: nps: avoid maybe-uninitialized warning
    clocksource: Add clockevent support to NPS400 driver
    clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer
    soc: Support for NPS HW scheduling
    clocksource: import ARC timer driver
    ARC: breakout timer include code into separate header ...
    ARC: move mcip.h into include/soc and adjust the includes
    ARC: breakout aux handling into a separate header
    ARC: time: move time_init() out of the driver
    ARC: timer: gfrc, rtc: build under same option (64-bit timers)
    ARC: timer: gfrc, rtc: Read BCR to detect whether hardware exists ...
    ARC: timer: gfrc, rtc: deuglify big endian code

    Linus Torvalds
     

01 Dec, 2016

4 commits

  • We get a harmless false-positive warning with the newly added nps
    clocksource driver:

    drivers/clocksource/timer-nps.c: In function 'nps_setup_clocksource':
    drivers/clocksource/timer-nps.c:102:6: error: 'nps_timer1_freq' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    Gcc here fails to identify that IS_ERR() is only true if PTR_ERR()
    has a nonzero value. Using PTR_ERR_OR_ZERO() to convert the result
    first makes this obvious and shuts up the warning.

    Fixes: 0ee4d9922df5 ("clocksource: Add clockevent support to NPS400 driver")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Vineet Gupta

    Arnd Bergmann
     
  • Till now we used clockevent from generic ARC driver.
    This was enough as long as we worked with simple multicore SoC.
    When we are working with multithread SoC each HW thread can be
    scheduled to receive timer interrupt using timer mask register.
    This patch will provide a way to control clock events per HW thread.

    The design idea is that for each core there is dedicated register
    (TSI) serving all 16 HW threads.
    The register is a bitmask with one bit for each HW thread.
    When HW thread wants that next expiration of timer interrupt will
    hit it then the proper bit should be set in this dedicated register.
    When timer expires all HW threads within this core which their bit
    is set at the TSI register will be interrupted.

    Driver can be used from device tree by:
    compatible = "ezchip,nps400-timer0"
    Acked-by: Daniel Lezcano
    Acked-by: Rob Herring

    Noam Camus
     
  • nps_setup_clocksource() should take node as only argument as defined by
    typedef int (*of_init_fn_1_ret)(struct device_node *)

    Therefore need to replace:
    int __init nps_setup_clocksource(struct device_node *node, struct clk *clk)
    with
    int __init nps_setup_clocksource(struct device_node *node)

    This patch also serve as preparation for next patch which add support
    for clockevents to nps400.
    Specifically we add new function nps_get_timer_clk() to serve clocksource
    and later clockevent registration.

    Signed-off-by: Noam Camus
    Acked-by: Daniel Lezcano

    Noam Camus
     
  • This adds support for

    - CONFIG_ARC_TIMERS : legacy 32-bit TIMER0 and TIMER1 which count UP
    from @CNT to @LIMIT, before optionally triggering an interrupt.
    These are programmed using ARC auxiliary register interface.
    These are present in all ARC cores (ARC700 and ARC HS38)
    TIMER0 serves as clockevent for all ARC linux builds.
    TIMER1 is used for clocksource in arc700 builds.

    - CONFIG_ARC_TIMERS_64BIT: 64-bit counters, RTC and GFRC found in
    ARC HS38 cores. These are independnet IP blocks with different
    programming model respectively.

    Link: http://lkml.kernel.org/r/20161111231132.GA4186@mai
    Acked-by: Daniel Lezcano
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

22 Nov, 2016

1 commit


21 Nov, 2016

2 commits


18 Nov, 2016

1 commit

  • This is the pxa changes for v4.10 cycle.

    This cycle is covering :
    - some clock fixes common with sa1100 architecture
    - the consequence of the pxa_camera conversion to v4l2
    - a small irq related fix for pxa25x device-tree only

    * tag 'pxa-for-4.10' of https://github.com/rjarzmik/linux:
    ARM: pxa: fix pxa25x interrupt init
    ARM: pxa: remove duplicated include from spitz.c
    ARM: pxa: em-x270: use the new pxa_camera platform_data
    ARM: pxa: ezx: use the new pxa_camera platform_data
    ARM: pxa: mioa701: use the new pxa_camera platform_data
    ARM: pxa: pxa_cplds: honor probe deferral
    ARM: sa11x0/pxa: get rid of get_clock_tick_rate
    watchdog: sa11x0/pxa: get rid of get_clock_tick_rate
    ARM: sa11x0/pxa: acquire timer rate from the clock rate
    clk: pxa25x: OSTIMER0 clocks from the main oscillator

    Signed-off-by: Olof Johansson

    Olof Johansson
     

21 Oct, 2016

2 commits

  • struct clocksource is also used by the clk notifier callback, to
    unregister and re-register the clocksource with a different clock rate.
    clocksource_mmio_init does not pass back a pointer to the struct used,
    and the clk notifier callback assumes that the struct clocksource in
    struct sun5i_timer_clksrc is valid. This results in a kernel NULL
    pointer dereference when the hstimer clock is changed:

    Unable to handle kernel NULL pointer dereference at virtual address 00000004
    [] (clocksource_unbind) from [] (clocksource_unregister+0x2c/0x44)
    [] (clocksource_unregister) from [] (sun5i_rate_cb_clksrc+0x34/0x3c)
    [] (sun5i_rate_cb_clksrc) from [] (notifier_call_chain+0x44/0x84)
    [] (notifier_call_chain) from [] (__srcu_notifier_call_chain+0x44/0x60)
    [] (__srcu_notifier_call_chain) from [] (srcu_notifier_call_chain+0x18/0x20)
    [] (srcu_notifier_call_chain) from [] (__clk_notify+0x70/0x7c)
    [] (__clk_notify) from [] (clk_propagate_rate_change+0xa4/0xc4)
    [] (clk_propagate_rate_change) from [] (clk_propagate_rate_change+0x6c/0xc4)

    Revert the commit for now. clocksource_mmio_init can be made to pass back
    a pointer, but the code churn and usage of an inner struct might not be
    worth it.

    Fixes: 157dfadef832 ("clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init")
    Reported-by: Maxime Ripard
    Signed-off-by: Chen-Yu Tsai
    Cc: linux-sunxi@googlegroups.com
    Cc: Daniel Lezcano
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/20161018054918.26855-1-wens@csie.org
    Signed-off-by: Thomas Gleixner

    Chen-Yu Tsai
     
  • At the hardware level, the J-Core PIT is integrated with the interrupt
    controller, but it is represented as its own device and has an
    independent programming interface. It provides a 12-bit countdown
    timer, which is not presently used, and a periodic timer. The interval
    length for the latter is programmable via a 32-bit throttle register
    whose units are determined by a bus-period register. The periodic
    timer is used to implement both periodic and oneshot clock event
    modes; in oneshot mode the interrupt handler simply disables the timer
    as soon as it fires.

    Despite its device tree node representing an interrupt for the PIT,
    the actual irq generated is programmable, not hard-wired. The driver
    is responsible for programming the PIT to generate the hardware irq
    number that the DT assigns to it.

    On SMP configurations, J-Core provides cpu-local instances of the PIT;
    no broadcast timer is needed. This driver supports the creation of the
    necessary per-cpu clock_event_device instances.

    A nanosecond-resolution clocksource is provided using the J-Core "RTC"
    registers, which give a 64-bit seconds count and 32-bit nanoseconds
    that wrap every second. The driver converts these to a full-range
    32-bit nanoseconds count.

    Signed-off-by: Rich Felker
    Cc: Mark Rutland
    Cc: devicetree@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: Daniel Lezcano
    Cc: Rob Herring
    Link: http://lkml.kernel.org/r/b591ff12cc5ebf63d1edc98da26046f95a233814.1476393790.git.dalias@libc.org
    Signed-off-by: Thomas Gleixner

    Rich Felker
     

18 Oct, 2016

1 commit


08 Oct, 2016

1 commit

  • Pull ARM SoC driver updates from Arnd Bergmann:
    "Driver updates for ARM SoCs, including a couple of newly added
    drivers:

    - The Qualcomm external bus interface 2 (EBI2), used in some of their
    mobile phone chips for connecting flash memory, LCD displays or
    other peripherals

    - Secure monitor firmware for Amlogic SoCs, and an NVMEM driver for
    the EFUSE based on that firmware interface.

    - Perf support for the AppliedMicro X-Gene performance monitor unit

    - Reset driver for STMicroelectronics STM32

    - Reset driver for SocioNext UniPhier SoCs

    Aside from these, there are minor updates to SoC-specific bus,
    clocksource, firmware, pinctrl, reset, rtc and pmic drivers"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits)
    bus: qcom-ebi2: depend on HAS_IOMEM
    pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181
    clk: mvebu: Add clk support for the orion5x SoC mv88f5181
    dt-bindings: EXYNOS: Add Exynos5433 PMU compatible
    clocksource: exynos_mct: Add the support for ARM64
    perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver
    Documentation: Add documentation for APM X-Gene SoC PMU DTS binding
    MAINTAINERS: Add entry for APM X-Gene SoC PMU driver
    bus: qcom: add EBI2 driver
    bus: qcom: add EBI2 device tree bindings
    rtc: rtc-pm8xxx: Add support for pm8018 rtc
    nvmem: amlogic: Add Amlogic Meson EFUSE driver
    firmware: Amlogic: Add secure monitor driver
    soc: qcom: smd: Reset rx tail rather than tx
    memory: atmel-sdramc: fix a possible NULL dereference
    reset: hi6220: allow to compile test driver on other architectures
    reset: zynq: add driver Kconfig option
    reset: sunxi: add driver Kconfig option
    reset: stm32: add driver Kconfig option
    reset: socfpga: add driver Kconfig option
    ...

    Linus Torvalds
     

04 Oct, 2016

1 commit

  • Pull timer updates from Thomas Gleixner:
    "A rather smalish set of updates for timers and timekeeping:

    - Two core fixes to prevent potential undefinded behaviour about
    which gcc is complaining rightfully.

    - A fix to prevent stopping the tick on an (soon) offline CPU so it
    can complete the shutdown procedure.

    - Wait for clocks to stabilize before making decisions, so a not yet
    validated clock is not rejected.

    - The usual pile of fixes to the various clocksource drivers.

    - Core code typo and include fixlets"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    timekeeping: Include the correct header for errno definitions
    clocksource/drivers/ti-32k: Prevent ftrace recursion
    clocksource/mips-gic-timer: Stop checking cpu_has_counter
    clocksource/mips-gic-timer: Print an error if IRQ setup fails
    tick/nohz: Prevent stopping the tick on an offline CPU
    clocksource/drivers/oxnas: Add OX820 compatible
    clocksource/drivers/timer-atmel-pit: Simplify IRQ handler
    clocksource/drivers/timer-atmel-pit: Remove uselesss WARN_ON_ONCE
    clocksource/drivers/timer-atmel-pit: Drop at91sam926x_pit_common_init
    clocksource/drivers/moxart: Replace panic by pr_err
    clocksource/drivers/moxart: Replace setup_irq by request_irq
    clocksource/drivers/moxart: Add Aspeed support
    clocksource/drivers/moxart: Use struct to hold state
    clocksource/drivers/moxart: Refactor enable/disable
    time: Avoid undefined behaviour in ktime_add_safe()
    time: Avoid undefined behaviour in timespec64_add_safe()
    timekeeping: Prints the amounts of time spent during suspend
    clocksource: Defer override invalidation unless clock is unstable
    hrtimer: Spelling fixes

    Linus Torvalds
     

03 Oct, 2016

1 commit

  • Pull arm64 updates from Will Deacon:
    "It's a bit all over the place this time with no "killer feature" to
    speak of. Support for mismatched cache line sizes should help people
    seeing whacky JIT failures on some SoCs, and the big.LITTLE perf
    updates have been a long time coming, but a lot of the changes here
    are cleanups.

    We stray outside arch/arm64 in a few areas: the arch/arm/ arch_timer
    workaround is acked by Russell, the DT/OF bits are acked by Rob, the
    arch_timer clocksource changes acked by Marc, CPU hotplug by tglx and
    jump_label by Peter (all CC'd).

    Summary:

    - Support for execute-only page permissions
    - Support for hibernate and DEBUG_PAGEALLOC
    - Support for heterogeneous systems with mismatches cache line sizes
    - Errata workarounds (A53 843419 update and QorIQ A-008585 timer bug)
    - arm64 PMU perf updates, including cpumasks for heterogeneous systems
    - Set UTS_MACHINE for building rpm packages
    - Yet another head.S tidy-up
    - Some cleanups and refactoring, particularly in the NUMA code
    - Lots of random, non-critical fixes across the board"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (100 commits)
    arm64: tlbflush.h: add __tlbi() macro
    arm64: Kconfig: remove SMP dependence for NUMA
    arm64: Kconfig: select OF/ACPI_NUMA under NUMA config
    arm64: fix dump_backtrace/unwind_frame with NULL tsk
    arm/arm64: arch_timer: Use archdata to indicate vdso suitability
    arm64: arch_timer: Work around QorIQ Erratum A-008585
    arm64: arch_timer: Add device tree binding for A-008585 erratum
    arm64: Correctly bounds check virt_addr_valid
    arm64: migrate exception table users off module.h and onto extable.h
    arm64: pmu: Hoist pmu platform device name
    arm64: pmu: Probe default hw/cache counters
    arm64: pmu: add fallback probe table
    MAINTAINERS: Update ARM PMU PROFILING AND DEBUGGING entry
    arm64: Improve kprobes test for atomic sequence
    arm64/kvm: use alternative auto-nop
    arm64: use alternative auto-nop
    arm64: alternative: add auto-nop infrastructure
    arm64: lse: convert lse alternatives NOP padding to use __nops
    arm64: barriers: introduce nops and __nops macros for NOP sequences
    arm64: sysreg: replace open-coded mrs_s/msr_s with {read,write}_sysreg_s
    ...

    Linus Torvalds
     

24 Sep, 2016

2 commits

  • Instead of comparing the name to a magic string, use archdata to
    explicitly communicate whether the arch timer is suitable for
    direct vdso access.

    Acked-by: Will Deacon
    Acked-by: Russell King
    Acked-by: Marc Zyngier
    Signed-off-by: Scott Wood
    Signed-off-by: Will Deacon

    Scott Wood
     
  • Erratum A-008585 says that the ARM generic timer counter "has the
    potential to contain an erroneous value for a small number of core
    clock cycles every time the timer value changes". Accesses to TVAL
    (both read and write) are also affected due to the implicit counter
    read. Accesses to CVAL are not affected.

    The workaround is to reread TVAL and count registers until successive
    reads return the same value. Writes to TVAL are replaced with an
    equivalent write to CVAL.

    The workaround is to reread TVAL and count registers until successive reads
    return the same value, and when writing TVAL to retry until counter
    reads before and after the write return the same value.

    The workaround is enabled if the fsl,erratum-a008585 property is found in
    the timer node in the device tree. This can be overridden with the
    clocksource.arm_arch_timer.fsl-a008585 boot parameter, which allows KVM
    users to enable the workaround until a mechanism is implemented to
    automatically communicate this information.

    This erratum can be found on LS1043A and LS2080A.

    Acked-by: Marc Zyngier
    Signed-off-by: Scott Wood
    [will: renamed read macro to reflect that it's not usually unstable]
    Signed-off-by: Will Deacon

    Scott Wood
     

22 Sep, 2016

1 commit

  • Currently ti-32k can be used as a scheduler clock. We properly marked
    omap_32k_read_sched_clock() as notrace but we then call another
    function ti_32k_read_cycles() that _wasn't_ notrace.

    Having a traceable function in the sched_clock() path leads to a
    recursion within ftrace and a kernel crash.

    Fix this by adding notrace attribute to the ti_32k_read_cycles()
    function.

    Signed-off-by: Jisheng Zhang
    Cc: daniel.lezcano@linaro.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/20160922075621.3725-1-jszhang@marvell.com
    Signed-off-by: Thomas Gleixner

    Jisheng Zhang
     

21 Sep, 2016

2 commits

  • The cpu_has_counter macro indicates whether the current CPU has a
    working coprocessor 0 count & compare registers, and has no bearing on
    the GIC. Stop checking it.

    Signed-off-by: Paul Burton
    Cc: linux-mips@linux-mips.org
    Cc: Daniel Lezcano
    Link: http://lkml.kernel.org/r/20160913165644.627-2-paul.burton@imgtec.com
    Signed-off-by: Thomas Gleixner

    Paul Burton
     
  • We've checked for errors from setup_irq_percpu since commit f95ac8558b88
    ("CLOCKSOURCE: mips-gic: Add missing error returns checks") but didn't
    print an error message in the failure case. This makes it very easy to
    overlook the GIC timer clock event driver not being registered, since
    we'll generally just use a different clock event driver if that happens.

    Print an error if IRQ setup fails in order to make such problems harder
    to miss (ie. not completely silent).

    Signed-off-by: Paul Burton
    Cc: linux-mips@linux-mips.org
    Cc: Daniel Lezcano
    Link: http://lkml.kernel.org/r/20160913165644.627-1-paul.burton@imgtec.com
    Signed-off-by: Thomas Gleixner

    Paul Burton
     

19 Sep, 2016

1 commit

  • …it/krzk/linux into next/drivers

    Pull "Samsung drivers/soc update for v4.9" from Krzysztof Kozlowski:

    1. Allow compile testing of exynos-mct clocksource driver on ARM64.
    2. Document Exynos5433 PMU compatible (already used by clkout driver and more
    will be coming soon).

    * tag 'samsung-drivers-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
    dt-bindings: EXYNOS: Add Exynos5433 PMU compatible
    clocksource: exynos_mct: Add the support for ARM64

    Arnd Bergmann
     

16 Sep, 2016

1 commit

  • This patch allows building and compile-testing the driver also for
    ARM64. The delay_timer is only supported on ARMv7.

    Cc: Daniel Lezcano
    Cc: Thomas Gleixner
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Signed-off-by: Chanwoo Choi
    Acked-by: Daniel Lezcano
    [k.kozlowski: Adjusted commit msg]
    Signed-off-by: Krzysztof Kozlowski

    Chanwoo Choi
     

12 Sep, 2016

6 commits


09 Sep, 2016

3 commits

  • The Aspeed SoC has timer IP with a very similar register layout to the
    moxart timer. This patch adds support for the fourth and fifth gen
    aspeed SoCs, and has been tested on the ast2400 and ast2500.

    Signed-off-by: Joel Stanley
    Acked-by: Rob Herring
    Signed-off-by: Daniel Lezcano

    Joel Stanley
     
  • Add a struct moxart_timer to hold the driver state, including the
    irqaction and struct clock_event_device.

    Most importantly this holds values for enabling and disabling the timer,
    so future support can be added for devices that use different bits for
    enable/disable.

    In preparation for future hardware support we add a MOXART prefix to the
    existing values.

    Signed-off-by: Joel Stanley
    Signed-off-by: Daniel Lezcano

    Joel Stanley
     
  • This patch abstracts the enable and disable register writes into their
    own functions in preparation for future changes to use SoC specific
    values for the writes.

    Signed-off-by: Joel Stanley
    Signed-off-by: Daniel Lezcano

    Joel Stanley
     

29 Aug, 2016

1 commit

  • The previous fix introduced a check against the ret variable which
    is not defined, hence producing a compilation error:

    linux/drivers/clocksource/timer-atmel-pit.c: In function ‘at91sam926x_pit_dt_init’:
    linux/drivers/clocksource/timer-atmel-pit.c:264:2: error: ‘ret’ undeclared (first use in this function)
    ret = clk_prepare_enable(data->mck);
    ^
    linux/drivers/clocksource/timer-atmel-pit.c:264:2: note: each undeclared identifier is reported only once for each function it appears in

    Add the missing the variable 'ret'.

    Fixes: 504f34c9e45c "clocksource/drivers/atmel-pit: Convert init function to return error"
    Signed-off-by: Daniel Lezcano
    Cc: alexandre.belloni@free-electrons.com
    Cc: motobud@gmail.com
    Cc: realbright@lgcns.com
    Link: http://lkml.kernel.org/r/1472453043-24287-1-git-send-email-daniel.lezcano@linaro.org
    Signed-off-by: Thomas Gleixner

    Daniel Lezcano
     

26 Aug, 2016

2 commits

  • The bootloader (U-boot) sometimes uses this timer for various delays.
    It uses it as a ongoing counter, and does comparisons on the current
    counter value. The timer counter is never stopped.

    In some cases when the user interacts with the bootloader, or lets
    it idle for some time before loading Linux, the timer may expire,
    and an interrupt will be pending. This results in an unexpected
    interrupt when the timer interrupt is enabled by the kernel, at
    which point the event_handler isn't set yet. This results in a NULL
    pointer dereference exception, panic, and no way to reboot.

    Clear any pending interrupts after we stop the timer in the probe
    function to avoid this.

    Cc: stable@vger.kernel.org
    Signed-off-by: Chen-Yu Tsai
    Signed-off-by: Daniel Lezcano
    Acked-by: Maxime Ripard

    Chen-Yu Tsai
     
  • Driver init code incorrectly uses the block base address and as a result
    clears clocksource structure's fields instead of the hardware registers.

    Commit 09a998201649 ("timekeeping: Lift clocksource cacheline
    restriction") has changed the offsets within pistachio_clocksource
    structure and what has previously gone unnoticed now leads to a kernel
    panic during boot.

    Signed-off-by: Marcin Nowakowski
    Signed-off-by: Daniel Lezcano

    Marcin Nowakowski