mbox

[GIT,PULL] clockevents for 4.5

Message ID 5672CB9E.7090707@linaro.org
State New
Headers show

Pull-request

http://git.linaro.org/people/daniel.lezcano/linux.git kevin-bot

Message

Daniel Lezcano Dec. 17, 2015, 2:50 p.m. UTC
Hi Thomas,

this pull request is bigger than the other ones. It contains a lot of 
changes and cleanups in order to increase the compilation test coverage.

  - Add cosmetic changes on error and a memory leakage on failure at 
init time for the mediatek timer (Alexey Klimov)

  - Remove the useless dsb() usage in the rockchip timer, the side 
effect is it can compile for the ARM and ARM64 (Caesar Wang)

  - Huge cleanups and fixes for the timers st_lpc, pxa_timer, tango, 
pistachio, mediatek, rockchip, armada-370-xp, meson6, orion, digicolor, 
dw_apb, sun4i, sun5i, tegra2, vt8500, cadence_ttc, asm9260, lpc32xx, 
nomadik_mtu, prcmu, exynos_mct, samsung-pwm and fsl-ftm in order to add 
the COMPILE_TEST option (Daniel Lezcano)

  - Cleanup of the h8300 timers and add the COMPILE_TEST option (Daniel 
Lezcano)

  - Factor out the tango-xtal and the timer_sun5i code by using the 
clocksource_mmio_init (Daniel Lezcano)

  - Fix suspend / resume on the arch_arm_timer (Grygorii Strashko)

  - Implement an ARM delay timer, fix return value and use relaxed io to 
improve performances on the dw_apb_timer (Jisheng Zhang)

  - Improve greatly performances by using writel_relaxed in 
gt_compare_set in the arm_global_timer (Jisheng Zhang)

  - Use the dynamic irq affinity flag on the tegra2 timer (Lucas Stach)

  - Correct pr_err() output format on the lpc32 timer (Vladimir Zapolskiy)

  - Second round of cleanups on the h8300 timers (Yoshinori Sato)

Tested on kernelci.org:
https://kernelci.org/build/dlezcano/kernel/v4.4-rc2-71-gd33f250af4e6/
https://kernelci.org/boot/all/job/dlezcano/kernel/v4.4-rc2-71-gd33f250af4e6/

Thanks !

   -- Daniel


The following changes since commit 82bbe34b3d895fb026b2fc0e7da2e641797bfaed:

   nohz: Clarify magic in tick_nohz_stop_sched_tick() (2015-11-25 
22:37:27 +0100)

are available in the git repository at:

   http://git.linaro.org/people/daniel.lezcano/linux.git kevin-bot

for you to fetch changes up to d33f250af4e67d449f2c748b861ba99d50955469:

   clocksource/drivers/h8300: Use ioread / iowrite (2015-12-16 17:20:13 
+0100)

----------------------------------------------------------------
Alexey Klimov (3):
       clocksource/drivers/mtk_timer: Add pr_fmt define
       clocksource/drivers/mtk_timer: Fix pr_warn() messages in 
mtk_timer_init
       clocksource/drivers/mtk_timer: Fix memleak in mtk_timer_init()

Caesar Wang (2):
       clocksource/drivers/rockchip: Make the driver more readable
       clocksource/drivers/rockchip: Remove dsb() usage

Daniel Lezcano (49):
       time: Define dummy functions for the generic sched clock
       clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM 
architecture
       clocksource/drivers/st_lpc: Fix Kconfig dependency
       clocksource/drivers/st_lpc: Add the COMPILE_TEST option
       clocksource/drivers/pxa_timer: Move the Kconfig rule
       clocksource/drivers/pxa_timer: Add the COMPILE_TEST option
       clocksource/drivers/tango: Add COMPILE_TEST option
       clocksource/drivers/pistachio: Add the COMPILE_TEST option
       clocksource/drivers/mediatek: Add the COMPILE_TEST option
       clocksource/drivers/rockchip: Add COMPILE_TEST option
       clocksource/drivers/armada-370-xp: Add the COMPILE_TEST option
       clocksource/drivers/meson6: Add the COMPILE_TEST option
       clocksource/drivers/orion: Add the COMPILE_TEST option
       clocksource/drivers/digicolor: Add the COMPILE_TEST option
       clocksource/drivers/dw_apb: Add the COMPILE_TEST option
       clocksource/drivers/sun4i: Add the COMPILE_TEST option
       clocksource/drivers/sun5i: Add the COMPILE_TEST option
       clocksource/drivers/tegra2: Add the COMPILE_TEST option
       clocksource/drivers/vt8500: Remove unneeded header
       clocksource/drivers/vt8500: Add the COMPILE_TEST option
       clocksource/drivers/cadence_ttc: Add the COMPILE_TEST option
       clocksource/drivers/asm9260: Add the COMPILE_TEST option
       clocksource/drivers/lpc32xx: Add the COMPILE_TEST option
       clocksource/drivers/nomadik_mtu: Add the COMPILE_TEST option
       clocksource/drivers/prcmu: Fix Kconfig and add COMPILE_TEST option
       clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST 
option
       clocksource/drivers/samsung-pwm: Add the COMPILE_TEST option
       clocksource/drivers/fsl-ftm: Add the COMPILE_TEST option
       clocksource/drivers/Kconfig: Add missing GENERIC_CLOCKEVENTS 
dependency
       clocksource/drivers/h8300_timer8: Fix compilation error with dev_warn
       clocksource/drivers/h8300_tpu: Remove unused macros
       clocksource/drivers/h8300_tpu: Remove pointless headers for TPU
       clocksource/drivers/h8300_timer8: Remove unused headers
       clocksource/drivers/h8300_timer8: Remove unused macros
       clocksource/drivers/h8300_timer8: Remove PERIODIC and ONESHOT macro
       clocksource/drivers/h8300_timer8: Fix irq return value check
       clocksource/drivers/h8300_timer8: Remove pointless irq re-entrant 
safe code
       clocksource/drivers/h8300_timer8: Remove irq and lock legacy code
       clocksource/drivers/h8300_timer8: Retrieve the clock rate at init 
time
       clocksource/drivers/h8300_timer16: Remove pointless headers
       clocksource/drivers/h8300_timer16: Remove unused macros
       clocksource/drivers/h8300_timer16: Remove unused fields in 
timer16_priv
       clocksource/drivers/h8300_timer16: Fix irq return value check
       clocksource/drivers/h8300_timer16: Remove pointless lock
       clocksource/drivers/timer_sun5i: Replace code by 
clocksource_mmio_init
       clocksource/drivers/h8300_timer8: Separate the Kconfig option 
from the arch
       h8300: Rename ctlr_out/in[bwl] to raw_read/write[bwl]
       clocksource/drivers/h8300: Increase the compilation test coverage
       clocksource/drivers/tango-xtal: Replace code by clocksource_mmio_init

Grygorii Strashko (1):
       clocksource/drivers/arm_global_timer: Fix suspend resume

Jisheng Zhang (6):
       clocksource/drivers/dw_apb_timer_of: Implement ARM delay timer
       clocksource/drivers/dw_apb_timer: Fix apbt_readl return types
       clocksource/drivers/dw_apb_timer: Use {readl|writel}_relaxed in 
critical path
       clocksource/drivers/dw_apb_timer: Inline apbt_readl and apbt_writel
       clockevents/drivers/arm_global_timer: Use writel_relaxed in 
gt_compare_set
       clocksource/drivers/pistachio: Fix wrong calculated clocksource 
read value

Lucas Stach (1):
       clocksource/drivers/tegra: Allow timer irq affinity change

Vladimir Zapolskiy (1):
       clocksource/drivers/lpc32: Correct pr_err() output format

Yoshinori Sato (6):
       clocksource/drivers/h8300: Cleanup startup and remove module code.
       clocksource/drivers/h8300: Change to overflow interrupt
       clocksource/drivers/h8300: Fix timer not overflow case
       clocksource/drivers/h8300: Simplify delta handling
       clocksource/drivers/h8300: Initializer cleanup.
       clocksource/drivers/h8300: Use ioread / iowrite

  arch/arm/Kconfig                       |   3 +++
  arch/arm/mach-exynos/Kconfig           |   1 +
  arch/arm/mach-sti/Kconfig              |   1 +
  arch/arm/mach-ux500/Kconfig            |   1 +
  arch/h8300/Kconfig                     |   1 +
  arch/h8300/include/asm/io.h            |  39 
++++++++++++++++++++--------------
  arch/h8300/kernel/setup.c              |   8 +++----
  drivers/clocksource/Kconfig            | 132 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
  drivers/clocksource/Makefile           |   2 +-
  drivers/clocksource/arm_global_timer.c |  21 +++++++++++++-----
  drivers/clocksource/dw_apb_timer.c     |  46 
+++++++++++++++++++++++++---------------
  drivers/clocksource/dw_apb_timer_of.c  |  16 ++++++++++++++
  drivers/clocksource/h8300_timer16.c    | 222 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------
  drivers/clocksource/h8300_timer8.c     | 264 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------------------------------------
  drivers/clocksource/h8300_tpu.c        | 159 
++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------------------------------
  drivers/clocksource/mtk_timer.c        |  20 ++++++++++--------
  drivers/clocksource/rockchip_timer.c   |  23 +++++++++-----------
  drivers/clocksource/tango_xtal.c       |  18 +++-------------
  drivers/clocksource/tegra20_timer.c    |   3 ++-
  drivers/clocksource/time-lpc32xx.c     |   4 ++--
  drivers/clocksource/time-pistachio.c   |   2 +-
  drivers/clocksource/timer-sun5i.c      |  16 ++------------
  drivers/clocksource/vt8500_timer.c     |   1 -
  drivers/irqchip/irq-renesas-h8300h.c   |   8 +++----
  include/linux/sched_clock.h            |  12 ++++++++---
  25 files changed, 454 insertions(+), 569 deletions(-)

Comments

Matthias Brugger Dec. 30, 2015, 6:15 p.m. UTC | #1
On 18/12/15 15:17, Daniel Lezcano wrote:
> From: Alexey Klimov <alexey.klimov@linaro.org>
>
> 1) Change pr_warn()s to pr_err()s. These messages are actually errors and not
>     warnings.
> 2) Add missing \n.
> 3) Error message for kzalloc() failure is removed per suggestion by Joe Perches.
>     There is generic stack_dump() for allocation issues.
>
> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---

Acked-by: Matthias Brugger <matthias.bgg@gmail.com>

>   drivers/clocksource/mtk_timer.c | 14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c
> index 8f99cd7..e1e0642 100644
> --- a/drivers/clocksource/mtk_timer.c
> +++ b/drivers/clocksource/mtk_timer.c
> @@ -189,10 +189,8 @@ static void __init mtk_timer_init(struct device_node *node)
>   	struct clk *clk;
>
>   	evt = kzalloc(sizeof(*evt), GFP_KERNEL);
> -	if (!evt) {
> -		pr_warn("Can't allocate mtk clock event driver struct");
> +	if (!evt)
>   		return;
> -	}
>
>   	evt->dev.name = "mtk_tick";
>   	evt->dev.rating = 300;
> @@ -206,31 +204,31 @@ static void __init mtk_timer_init(struct device_node *node)
>
>   	evt->gpt_base = of_io_request_and_map(node, 0, "mtk-timer");
>   	if (IS_ERR(evt->gpt_base)) {
> -		pr_warn("Can't get resource\n");
> +		pr_err("Can't get resource\n");
>   		return;
>   	}
>
>   	evt->dev.irq = irq_of_parse_and_map(node, 0);
>   	if (evt->dev.irq <= 0) {
> -		pr_warn("Can't parse IRQ");
> +		pr_err("Can't parse IRQ\n");
>   		goto err_mem;
>   	}
>
>   	clk = of_clk_get(node, 0);
>   	if (IS_ERR(clk)) {
> -		pr_warn("Can't get timer clock");
> +		pr_err("Can't get timer clock\n");
>   		goto err_irq;
>   	}
>
>   	if (clk_prepare_enable(clk)) {
> -		pr_warn("Can't prepare clock");
> +		pr_err("Can't prepare clock\n");
>   		goto err_clk_put;
>   	}
>   	rate = clk_get_rate(clk);
>
>   	if (request_irq(evt->dev.irq, mtk_timer_interrupt,
>   			IRQF_TIMER | IRQF_IRQPOLL, "mtk_timer", evt)) {
> -		pr_warn("failed to setup irq %d\n", evt->dev.irq);
> +		pr_err("failed to setup irq %d\n", evt->dev.irq);
>   		goto err_clk_disable;
>   	}
>
>
Matthias Brugger Dec. 30, 2015, 6:16 p.m. UTC | #2
On 18/12/15 15:17, Daniel Lezcano wrote:
> Increase the compilation test coverage by adding the COMPILE_TEST option.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---

Acked-by: Matthias Brugger <matthias.bgg@gmail.com>

>   drivers/clocksource/Kconfig | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index 96a34dc..3ba43f6 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -228,9 +228,11 @@ config SYS_SUPPORTS_SH_CMT
>           bool
>
>   config MTK_TIMER
> +	bool "Mediatek timer driver" if COMPILE_TEST
>   	select CLKSRC_OF
>   	select CLKSRC_MMIO
> -	bool
> +	help
> +	  Support for Mediatek timer driver.
>
>   config SYS_SUPPORTS_SH_MTU2
>           bool
>