Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1293961 > unrolled thread
| Started by | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| First post | 2015-12-17 16:00 +0100 |
| Last post | 2015-12-18 15:50 +0100 |
| Articles | 20 on this page of 72 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL] clockevents for 4.5 Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-17 16:00 +0100
[PATCH 59/69] clocksource/drivers/dw_apb_timer: Use {readl|writel}_relaxed in critical path Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 11/69] clocksource/drivers/pxa_timer: Move the Kconfig rule Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 31/69] clocksource/drivers/prcmu: Fix Kconfig and add COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 03/69] clocksource/drivers/mtk_timer: Fix memleak in mtk_timer_init() Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 41/69] clocksource/drivers/h8300_timer8: Remove unused headers Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 05/69] clocksource/drivers/rockchip: Make the driver more readable Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 01/69] clocksource/drivers/mtk_timer: Add pr_fmt define Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 21/69] clocksource/drivers/dw_apb: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 07/69] clocksource/drivers/rockchip: Remove dsb() usage Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 34/69] clocksource/drivers/fsl-ftm: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 25/69] clocksource/drivers/vt8500: Remove unneeded header Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 53/69] clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:20 +0100
[PATCH 49/69] clocksource/drivers/h8300_timer16: Remove unused macros Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 54/69] clocksource/drivers/h8300_timer8: Separate the Kconfig option from the arch Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 51/69] clocksource/drivers/h8300_timer16: Fix irq return value check Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 66/69] clocksource/drivers/h8300: Fix timer not overflow case Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 47/69] clocksource/drivers/h8300_timer8: Retrieve the clock rate at init time Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 60/69] clocksource/drivers/dw_apb_timer: Inline apbt_readl and apbt_writel Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 65/69] clocksource/drivers/h8300: Change to overflow interrupt Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 55/69] h8300: Rename ctlr_out/in[bwl] to raw_read/write[bwl] Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 52/69] clocksource/drivers/h8300_timer16: Remove pointless lock Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 64/69] clocksource/drivers/lpc32: Correct pr_err() output format Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 48/69] clocksource/drivers/h8300_timer16: Remove pointless headers Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 63/69] clocksource/drivers/arm_global_timer: Fix suspend resume Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 68/69] clocksource/drivers/h8300: Initializer cleanup. Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 56/69] clocksource/drivers/h8300: Increase the compilation test coverage Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 67/69] clocksource/drivers/h8300: Simplify delta handling Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 50/69] clocksource/drivers/h8300_timer16: Remove unused fields in timer16_priv Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 44/69] clocksource/drivers/h8300_timer8: Fix irq return value check Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 58/69] clocksource/drivers/dw_apb_timer: Fix apbt_readl return types Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 45/69] clocksource/drivers/h8300_timer8: Remove pointless irq re-entrant safe code Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 62/69] clocksource/drivers/pistachio: Fix wrong calculated clocksource read value Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 46/69] clocksource/drivers/h8300_timer8: Remove irq and lock legacy code Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 69/69] clocksource/drivers/h8300: Use ioread / iowrite Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 61/69] clockevents/drivers/arm_global_timer: Use writel_relaxed in gt_compare_set Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 57/69] clocksource/drivers/tango-xtal: Replace code by clocksource_mmio_init Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:30 +0100
[PATCH 43/69] clocksource/drivers/h8300_timer8: Remove PERIODIC and ONESHOT macro Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 20/69] clocksource/drivers/digicolor: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 19/69] clocksource/drivers/orion: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 37/69] clocksource/drivers/h8300: Cleanup startup and remove module code. Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 30/69] clocksource/drivers/nomadik_mtu: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 40/69] clocksource/drivers/h8300_tpu: Remove pointless headers for TPU Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 39/69] clocksource/drivers/h8300_tpu: Remove unused macros Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 35/69] clocksource/drivers/Kconfig: Add missing GENERIC_CLOCKEVENTS dependency Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 27/69] clocksource/drivers/cadence_ttc: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 13/69] clocksource/drivers/tango: Add COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 17/69] clocksource/drivers/armada-370-xp: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 38/69] clocksource/drivers/h8300_timer8: Fix compilation error with dev_warn Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 42/69] clocksource/drivers/h8300_timer8: Remove unused macros Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 36/69] clocksource/drivers/dw_apb_timer_of: Implement ARM delay timer Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 26/69] clocksource/drivers/vt8500: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 22/69] clocksource/drivers/sun4i: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 12/69] clocksource/drivers/pxa_timer: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 23/69] clocksource/drivers/sun5i: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 28/69] clocksource/drivers/asm9260: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 18/69] clocksource/drivers/meson6: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 32/69] clocksource/drivers/exynos_mct: Fix Kconfig and add COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 24/69] clocksource/drivers/tegra2: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 29/69] clocksource/drivers/lpc32xx: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 33/69] clocksource/drivers/samsung-pwm: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:40 +0100
[PATCH 14/69] clocksource/drivers/pistachio: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
[PATCH 08/69] clocksource/drivers/qcom: Make COMPILE_TEST enabled for ARM architecture Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
[PATCH 09/69] clocksource/drivers/st_lpc: Fix Kconfig dependency Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
[PATCH 02/69] clocksource/drivers/mtk_timer: Fix pr_warn() messages in mtk_timer_init Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
Re: [PATCH 02/69] clocksource/drivers/mtk_timer: Fix pr_warn() messages in mtk_timer_init Matthias Brugger <matthias.bgg@gmail.com> - 2015-12-30 19:20 +0100
[PATCH 15/69] clocksource/drivers/mediatek: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
Re: [PATCH 15/69] clocksource/drivers/mediatek: Add the COMPILE_TEST option Matthias Brugger <matthias.bgg@gmail.com> - 2015-12-30 19:20 +0100
[PATCH 10/69] clocksource/drivers/st_lpc: Add the COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
[PATCH 06/69] time: Define dummy functions for the generic sched clock Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
[PATCH 16/69] clocksource/drivers/rockchip: Add COMPILE_TEST option Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
[PATCH 04/69] clocksource/drivers/tegra: Allow timer irq affinity change Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-12-18 15:50 +0100
Page 1 of 4 [1] 2 3 4 Next page →
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-17 16:00 +0100 |
| Subject | [GIT PULL] clockevents for 4.5 |
| Message-ID | <qGIcb-Ma-41@gated-at.bofh.it> |
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(-)
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 59/69] clocksource/drivers/dw_apb_timer: Use {readl|writel}_relaxed in critical path |
| Message-ID | <qH42Z-6Hj-7@gated-at.bofh.it> |
| In reply to | #1293961 |
From: Jisheng Zhang <jszhang@marvell.com>
It's safe to use the relaxed version. From another side, the relaxed io
accessor macros are available on all architectures now, so we can use
the relaxed versions to get a trivial system performance improvement,
we measured time the following functions spent on Marvell BG4CT:
4096 rounds of __apbt_read_clocksource() call:
before the patch: 1263240ns on average
after the patch: 1250080ns on average
improved by 1%
4096 rounds of apbt_eoi() call:
before the patch: 1290960ns on average
after the patch: 1248240ns on average
4096 rounds of apbt_next_event() call:
before the patch: 3333660ns on average
after the patch: 1322040ns on average
improved by 60%!
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/dw_apb_timer.c | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/clocksource/dw_apb_timer.c b/drivers/clocksource/dw_apb_timer.c
index 3a6d9db..7f95b53 100644
--- a/drivers/clocksource/dw_apb_timer.c
+++ b/drivers/clocksource/dw_apb_timer.c
@@ -60,6 +60,17 @@ static void apbt_writel(struct dw_apb_timer *timer, u32 val,
writel(val, timer->base + offs);
}
+static inline u32 apbt_readl_relaxed(struct dw_apb_timer *timer, unsigned long offs)
+{
+ return readl_relaxed(timer->base + offs);
+}
+
+static inline void apbt_writel_relaxed(struct dw_apb_timer *timer, u32 val,
+ unsigned long offs)
+{
+ writel_relaxed(val, timer->base + offs);
+}
+
static void apbt_disable_int(struct dw_apb_timer *timer)
{
u32 ctrl = apbt_readl(timer, APBTMR_N_CONTROL);
@@ -81,7 +92,7 @@ void dw_apb_clockevent_pause(struct dw_apb_clock_event_device *dw_ced)
static void apbt_eoi(struct dw_apb_timer *timer)
{
- apbt_readl(timer, APBTMR_N_EOI);
+ apbt_readl_relaxed(timer, APBTMR_N_EOI);
}
static irqreturn_t dw_apb_clockevent_irq(int irq, void *data)
@@ -200,13 +211,13 @@ static int apbt_next_event(unsigned long delta,
struct dw_apb_clock_event_device *dw_ced = ced_to_dw_apb_ced(evt);
/* Disable timer */
- ctrl = apbt_readl(&dw_ced->timer, APBTMR_N_CONTROL);
+ ctrl = apbt_readl_relaxed(&dw_ced->timer, APBTMR_N_CONTROL);
ctrl &= ~APBTMR_CONTROL_ENABLE;
- apbt_writel(&dw_ced->timer, ctrl, APBTMR_N_CONTROL);
+ apbt_writel_relaxed(&dw_ced->timer, ctrl, APBTMR_N_CONTROL);
/* write new count */
- apbt_writel(&dw_ced->timer, delta, APBTMR_N_LOAD_COUNT);
+ apbt_writel_relaxed(&dw_ced->timer, delta, APBTMR_N_LOAD_COUNT);
ctrl |= APBTMR_CONTROL_ENABLE;
- apbt_writel(&dw_ced->timer, ctrl, APBTMR_N_CONTROL);
+ apbt_writel_relaxed(&dw_ced->timer, ctrl, APBTMR_N_CONTROL);
return 0;
}
@@ -342,7 +353,8 @@ static cycle_t __apbt_read_clocksource(struct clocksource *cs)
struct dw_apb_clocksource *dw_cs =
clocksource_to_dw_apb_clocksource(cs);
- current_count = apbt_readl(&dw_cs->timer, APBTMR_N_CURRENT_VALUE);
+ current_count = apbt_readl_relaxed(&dw_cs->timer,
+ APBTMR_N_CURRENT_VALUE);
return (cycle_t)~current_count;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 11/69] clocksource/drivers/pxa_timer: Move the Kconfig rule |
| Message-ID | <qH42Z-6Hj-13@gated-at.bofh.it> |
| In reply to | #1293961 |
Instead of having the clocksource's Kconfig depending on the arch, let the arch to select the timer it needs. The CLKSRC_OF dependency is removed because already selected by the ARCH_PXA, and it is added for SA1100. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- arch/arm/Kconfig | 3 +++ drivers/clocksource/Kconfig | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0365cbb..a5d416e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -609,6 +609,7 @@ config ARCH_PXA select AUTO_ZRELADDR select COMMON_CLK select CLKDEV_LOOKUP + select CLKSRC_PXA select CLKSRC_MMIO select CLKSRC_OF select GENERIC_CLOCKEVENTS @@ -648,6 +649,8 @@ config ARCH_SA1100 select ARCH_SPARSEMEM_ENABLE select CLKDEV_LOOKUP select CLKSRC_MMIO + select CLKSRC_PXA + select CLKSRC_OF if OF select CPU_FREQ select CPU_SA1100 select GENERIC_CLOCKEVENTS diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 4117386..d4221e0 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -307,8 +307,7 @@ config CLKSRC_TANGO_XTAL select CLKSRC_OF config CLKSRC_PXA - def_bool y if ARCH_PXA || ARCH_SA1100 - select CLKSRC_OF if OF + bool help This enables OST0 support available on PXA and SA-11x0 platforms. -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 31/69] clocksource/drivers/prcmu: Fix Kconfig and add COMPILE_TEST option |
| Message-ID | <qH430-6Hj-19@gated-at.bofh.it> |
| In reply to | #1293961 |
Let the platform's Kconfig to select the clock instead of having a reverse dependency from the driver to the platform options. Add the COMPILE_TEST option for the compilation test coverage. This change is debatable as the option itself in the Kconfig allows to select the driver for the platform or not. This change will make the prcmu timer always selected. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> --- arch/arm/mach-ux500/Kconfig | 1 + drivers/clocksource/Kconfig | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index c9ac19b..5eacdd6 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig @@ -32,6 +32,7 @@ config UX500_SOC_DB8500 select PINCTRL_AB8540 select REGULATOR select REGULATOR_DB8500_PRCMU + select CLKSRC_DBX500_PRCMU select PM_GENERIC_DOMAINS if PM config MACH_MOP500 diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 847b3b1..e3ba5b4 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -123,9 +123,7 @@ config CLKSRC_NOMADIK_MTU_SCHED_CLOCK Use the Multi Timer Unit as the sched_clock. config CLKSRC_DBX500_PRCMU - bool "Clocksource PRCMU Timer" - depends on UX500_SOC_DB8500 - default y + bool "Clocksource PRCMU Timer" if COMPILE_TEST help Use the always on PRCMU Timer as clocksource -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 03/69] clocksource/drivers/mtk_timer: Fix memleak in mtk_timer_init() |
| Message-ID | <qH430-6Hj-25@gated-at.bofh.it> |
| In reply to | #1293961 |
From: Alexey Klimov <alexey.klimov@linaro.org>
Add error path to clear evt struct allocated by kzalloc() in the beginning of
function mtk_timer_init().
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/mtk_timer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c
index e1e0642..d67bc35 100644
--- a/drivers/clocksource/mtk_timer.c
+++ b/drivers/clocksource/mtk_timer.c
@@ -205,7 +205,7 @@ 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_err("Can't get resource\n");
- return;
+ goto err_kzalloc;
}
evt->dev.irq = irq_of_parse_and_map(node, 0);
@@ -260,5 +260,7 @@ err_mem:
iounmap(evt->gpt_base);
of_address_to_resource(node, 0, &res);
release_mem_region(res.start, resource_size(&res));
+err_kzalloc:
+ kfree(evt);
}
CLOCKSOURCE_OF_DECLARE(mtk_mt6577, "mediatek,mt6577-timer", mtk_timer_init);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 41/69] clocksource/drivers/h8300_timer8: Remove unused headers |
| Message-ID | <qH430-6Hj-21@gated-at.bofh.it> |
| In reply to | #1293961 |
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/clocksource/h8300_timer8.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c index 35b0e8f..62a7f8c 100644 --- a/drivers/clocksource/h8300_timer8.c +++ b/drivers/clocksource/h8300_timer8.c @@ -8,21 +8,16 @@ */ #include <linux/errno.h> -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/init.h> -#include <linux/slab.h> #include <linux/clockchips.h> -#include <linux/module.h> #include <linux/clk.h> #include <linux/io.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> -#include <asm/irq.h> - #define _8TCR 0 #define _8TCSR 2 #define TCORA 4 -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 05/69] clocksource/drivers/rockchip: Make the driver more readable |
| Message-ID | <qH430-6Hj-29@gated-at.bofh.it> |
| In reply to | #1293961 |
From: Caesar Wang <wxt@rock-chips.com>
Let's checkstyle to clean up the macros with such trivial details.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/rockchip_timer.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c
index d3c1742..b14716b6 100644
--- a/drivers/clocksource/rockchip_timer.c
+++ b/drivers/clocksource/rockchip_timer.c
@@ -17,16 +17,16 @@
#define TIMER_NAME "rk_timer"
-#define TIMER_LOAD_COUNT0 0x00
-#define TIMER_LOAD_COUNT1 0x04
-#define TIMER_CONTROL_REG 0x10
-#define TIMER_INT_STATUS 0x18
+#define TIMER_LOAD_COUNT0 0x00
+#define TIMER_LOAD_COUNT1 0x04
+#define TIMER_CONTROL_REG 0x10
+#define TIMER_INT_STATUS 0x18
-#define TIMER_DISABLE 0x0
-#define TIMER_ENABLE 0x1
-#define TIMER_MODE_FREE_RUNNING (0 << 1)
-#define TIMER_MODE_USER_DEFINED_COUNT (1 << 1)
-#define TIMER_INT_UNMASK (1 << 2)
+#define TIMER_DISABLE 0x0
+#define TIMER_ENABLE 0x1
+#define TIMER_MODE_FREE_RUNNING (0 << 1)
+#define TIMER_MODE_USER_DEFINED_COUNT (1 << 1)
+#define TIMER_INT_UNMASK (1 << 2)
struct bc_timer {
struct clock_event_device ce;
@@ -173,4 +173,5 @@ static void __init rk_timer_init(struct device_node *np)
clockevents_config_and_register(ce, bc_timer.freq, 1, UINT_MAX);
}
+
CLOCKSOURCE_OF_DECLARE(rk_timer, "rockchip,rk3288-timer", rk_timer_init);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 01/69] clocksource/drivers/mtk_timer: Add pr_fmt define |
| Message-ID | <qH42Z-6Hj-9@gated-at.bofh.it> |
| In reply to | #1293961 |
From: Alexey Klimov <alexey.klimov@linaro.org> It's a bit unclear what subsystem/driver emits some messages to dmesg in the function mtk_init_timer(). Use pr_fmt to auto-prefix the messages appropriately. Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/clocksource/mtk_timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c index fbfc746..8f99cd7 100644 --- a/drivers/clocksource/mtk_timer.c +++ b/drivers/clocksource/mtk_timer.c @@ -16,6 +16,8 @@ * GNU General Public License for more details. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/clk.h> #include <linux/clockchips.h> #include <linux/interrupt.h> -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 21/69] clocksource/drivers/dw_apb: Add the COMPILE_TEST option |
| Message-ID | <qH430-6Hj-35@gated-at.bofh.it> |
| In reply to | #1294848 |
Increase the compilation test coverage by adding the COMPILE_TEST option. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/clocksource/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 63a8c6f..24a8d8d 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -33,7 +33,9 @@ config DIGICOLOR_TIMER Enables the support for the digicolor timer driver. config DW_APB_TIMER - bool + bool "DW APB timer driver" if COMPILE_TEST + help + Enables the support for the dw_apb timer. config DW_APB_TIMER_OF bool -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 07/69] clocksource/drivers/rockchip: Remove dsb() usage |
| Message-ID | <qH430-6Hj-33@gated-at.bofh.it> |
| In reply to | #1294848 |
From: Caesar Wang <wxt@rock-chips.com>
The dsb() instruction is pointless in this code.
Remove it.
That also fixes the ARM64 compilation issue.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Caesar Wang <wxt@rock-chips.com>
---
drivers/clocksource/rockchip_timer.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource/rockchip_timer.c
index b14716b6..8c77a52 100644
--- a/drivers/clocksource/rockchip_timer.c
+++ b/drivers/clocksource/rockchip_timer.c
@@ -49,14 +49,12 @@ static inline void __iomem *rk_base(struct clock_event_device *ce)
static inline void rk_timer_disable(struct clock_event_device *ce)
{
writel_relaxed(TIMER_DISABLE, rk_base(ce) + TIMER_CONTROL_REG);
- dsb();
}
static inline void rk_timer_enable(struct clock_event_device *ce, u32 flags)
{
writel_relaxed(TIMER_ENABLE | TIMER_INT_UNMASK | flags,
rk_base(ce) + TIMER_CONTROL_REG);
- dsb();
}
static void rk_timer_update_counter(unsigned long cycles,
@@ -64,13 +62,11 @@ static void rk_timer_update_counter(unsigned long cycles,
{
writel_relaxed(cycles, rk_base(ce) + TIMER_LOAD_COUNT0);
writel_relaxed(0, rk_base(ce) + TIMER_LOAD_COUNT1);
- dsb();
}
static void rk_timer_interrupt_clear(struct clock_event_device *ce)
{
writel_relaxed(1, rk_base(ce) + TIMER_INT_STATUS);
- dsb();
}
static inline int rk_timer_set_next_event(unsigned long cycles,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 34/69] clocksource/drivers/fsl-ftm: Add the COMPILE_TEST option |
| Message-ID | <qH430-6Hj-37@gated-at.bofh.it> |
| In reply to | #1294848 |
Increase the compilation test coverage by adding the COMPILE_TEST option. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 3457a86..7085eb7 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -245,7 +245,7 @@ config CLKSRC_SAMSUNG_PWM needed only on systems that do not have the Exynos MCT available. config FSL_FTM_TIMER - bool + bool "Freescale FlexTimer Module driver" if COMPILE_TEST help Support for Freescale FlexTimer Module (FTM) timer. -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 25/69] clocksource/drivers/vt8500: Remove unneeded header |
| Message-ID | <qH430-6Hj-39@gated-at.bofh.it> |
| In reply to | #1294848 |
Remove the <asm/time.h> header inclusion which is pointless. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/clocksource/vt8500_timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/clocksource/vt8500_timer.c b/drivers/clocksource/vt8500_timer.c index a92e94b..de49805 100644 --- a/drivers/clocksource/vt8500_timer.c +++ b/drivers/clocksource/vt8500_timer.c @@ -30,7 +30,6 @@ #include <linux/clocksource.h> #include <linux/clockchips.h> #include <linux/delay.h> -#include <asm/mach/time.h> #include <linux/of.h> #include <linux/of_address.h> -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:20 +0100 |
| Subject | [PATCH 53/69] clocksource/drivers/timer_sun5i: Replace code by clocksource_mmio_init |
| Message-ID | <qH431-6Hj-41@gated-at.bofh.it> |
| In reply to | #1294848 |
The current code to initialize, register and read the clocksource is
already factored out in mmio.c via the clocksource_mmio_init function.
The only difference is the readl vs readl_relaxed.
Factor out the code with the clocksource_mmio_init function.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/clocksource/timer-sun5i.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
index bca9573..24c83f9 100644
--- a/drivers/clocksource/timer-sun5i.c
+++ b/drivers/clocksource/timer-sun5i.c
@@ -152,13 +152,6 @@ static irqreturn_t sun5i_timer_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static cycle_t sun5i_clksrc_read(struct clocksource *clksrc)
-{
- struct sun5i_timer_clksrc *cs = to_sun5i_timer_clksrc(clksrc);
-
- return ~readl(cs->timer.base + TIMER_CNTVAL_LO_REG(1));
-}
-
static int sun5i_rate_cb_clksrc(struct notifier_block *nb,
unsigned long event, void *data)
{
@@ -217,13 +210,8 @@ static int __init sun5i_setup_clocksource(struct device_node *node,
writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
base + TIMER_CTL_REG(1));
- cs->clksrc.name = node->name;
- cs->clksrc.rating = 340;
- cs->clksrc.read = sun5i_clksrc_read;
- cs->clksrc.mask = CLOCKSOURCE_MASK(32);
- cs->clksrc.flags = CLOCK_SOURCE_IS_CONTINUOUS;
-
- ret = clocksource_register_hz(&cs->clksrc, rate);
+ ret = clocksource_mmio_init(base + TIMER_CNTVAL_LO_REG(1), node->name,
+ rate, 340, 32, clocksource_mmio_readl_down);
if (ret) {
pr_err("Couldn't register clock source.\n");
goto err_remove_notifier;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | [PATCH 49/69] clocksource/drivers/h8300_timer16: Remove unused macros |
| Message-ID | <qH4cF-6Lj-1@gated-at.bofh.it> |
| In reply to | #1294848 |
The macros are no longer used in the code, remove them.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/h8300_timer16.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c
index 1c9dd02..bc9289b 100644
--- a/drivers/clocksource/h8300_timer16.c
+++ b/drivers/clocksource/h8300_timer16.c
@@ -14,29 +14,11 @@
#include <linux/of_irq.h>
#define TSTR 0
-#define TSNC 1
-#define TMDR 2
-#define TOLR 3
#define TISRA 4
-#define TISRB 5
#define TISRC 6
#define TCR 0
-#define TIOR 1
#define TCNT 2
-#define GRA 4
-#define GRB 6
-
-#define FLAG_REPROGRAM (1 << 0)
-#define FLAG_SKIPEVENT (1 << 1)
-#define FLAG_IRQCONTEXT (1 << 2)
-#define FLAG_STARTED (1 << 3)
-
-#define ONESHOT 0
-#define PERIODIC 1
-
-#define RELATIVE 0
-#define ABSOLUTE 1
struct timer16_priv {
struct clocksource cs;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | [PATCH 54/69] clocksource/drivers/h8300_timer8: Separate the Kconfig option from the arch |
| Message-ID | <qH4cF-6Lj-7@gated-at.bofh.it> |
| In reply to | #1294848 |
The current Kconfig option is the H8300 arch option. In order to comply to the
current rule, let's create a specific option for the timer8 and select it
from the arch's Kconfig.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/h8300/Kconfig | 1 +
drivers/clocksource/Kconfig | 3 +++
drivers/clocksource/Makefile | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index dd3ac75..2e20333 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -17,6 +17,7 @@ config H8300
select HAVE_MEMBLOCK
select HAVE_DMA_ATTRS
select CLKSRC_OF
+ select H8300_TMR8
config RWSEM_GENERIC_SPINLOCK
def_bool y
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index de331b8..73477b5 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -362,6 +362,9 @@ config CLKSRC_PXA
This enables OST0 support available on PXA and SA-11x0
platforms.
+config H8300_TMR8
+ bool
+
config H8300_TMR16
bool
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index 56bd16e..dc2b899 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -60,7 +60,7 @@ obj-$(CONFIG_CLKSRC_MIPS_GIC) += mips-gic-timer.o
obj-$(CONFIG_CLKSRC_TANGO_XTAL) += tango_xtal.o
obj-$(CONFIG_CLKSRC_IMX_GPT) += timer-imx-gpt.o
obj-$(CONFIG_ASM9260_TIMER) += asm9260_timer.o
-obj-$(CONFIG_H8300) += h8300_timer8.o
+obj-$(CONFIG_H8300_TMR8) += h8300_timer8.o
obj-$(CONFIG_H8300_TMR16) += h8300_timer16.o
obj-$(CONFIG_H8300_TPU) += h8300_tpu.o
obj-$(CONFIG_CLKSRC_ST_LPC) += clksrc_st_lpc.o
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | [PATCH 51/69] clocksource/drivers/h8300_timer16: Fix irq return value check |
| Message-ID | <qH4cF-6Lj-3@gated-at.bofh.it> |
| In reply to | #1294848 |
The function irq_of_parse_and_map returns zero in case of failure.
Fix the return code test to check against zero.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/h8300_timer16.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c
index 6705bf7..129dca0 100644
--- a/drivers/clocksource/h8300_timer16.c
+++ b/drivers/clocksource/h8300_timer16.c
@@ -155,7 +155,7 @@ static void __init h8300_16timer_init(struct device_node *node)
}
irq = irq_of_parse_and_map(node, 0);
- if (irq < 0) {
+ if (!irq) {
pr_err("failed to get irq for clockevent\n");
goto unmap_comm;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | [PATCH 66/69] clocksource/drivers/h8300: Fix timer not overflow case |
| Message-ID | <qH4cF-6Lj-9@gated-at.bofh.it> |
| In reply to | #1294848 |
From: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/clocksource/h8300_timer16.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c index b14a8da..934ed0b 100644 --- a/drivers/clocksource/h8300_timer16.c +++ b/drivers/clocksource/h8300_timer16.c @@ -48,8 +48,10 @@ static unsigned long timer16_get_counter(struct timer16_priv *p) } while (unlikely((o1 != o2) || (v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1) || (v3 > v1 && v3 < v2))); - v2 |= 0x10000; - return v2; + if (likely(!o1)) + return v2; + else + return v2 + 0x10000; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | [PATCH 47/69] clocksource/drivers/h8300_timer8: Retrieve the clock rate at init time |
| Message-ID | <qH4cG-6Lj-15@gated-at.bofh.it> |
| In reply to | #1294848 |
The current code retrieves the rate value when the timer is enabled which
occurs each time a timer is re-armed. Except if the clock frequency has changed
magically I don't see why this should be done each time.
Retrieve the clock rate value at init time only.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/h8300_timer8.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c
index 24d91b1..187c416 100644
--- a/drivers/clocksource/h8300_timer8.c
+++ b/drivers/clocksource/h8300_timer8.c
@@ -34,7 +34,6 @@ struct timer8_priv {
unsigned long flags;
unsigned int rate;
unsigned int tcora;
- struct clk *pclk;
};
static unsigned long timer8_get_counter(struct timer8_priv *p)
@@ -92,7 +91,6 @@ static void timer8_set_next(struct timer8_priv *p, unsigned long delta)
static int timer8_enable(struct timer8_priv *p)
{
- p->rate = clk_get_rate(p->pclk) / SCALE;
ctrl_outw(0xffff, p->mapbase + TCORA);
ctrl_outw(0x0000, p->mapbase + _8TCNT);
ctrl_outw(0x0c02, p->mapbase + _8TCR);
@@ -102,16 +100,15 @@ static int timer8_enable(struct timer8_priv *p)
static int timer8_start(struct timer8_priv *p)
{
- int ret = 0;
+ int ret;
- if (!(p->flags & FLAG_STARTED))
- ret = timer8_enable(p);
+ if ((p->flags & FLAG_STARTED))
+ return 0;
- if (ret)
- goto out;
- p->flags |= FLAG_STARTED;
+ ret = timer8_enable(p);
+ if (!ret)
+ p->flags |= FLAG_STARTED;
- out:
return ret;
}
@@ -217,7 +214,12 @@ static void __init h8300_8timer_init(struct device_node *node)
}
timer8_priv.mapbase = (unsigned long)base;
- timer8_priv.pclk = clk;
+
+ rate = clk_get_rate(clk) / SCALE;
+ if (!rate) {
+ pr_err("Failed to get rate for the clocksource\n");
+ goto unmap_reg;
+ }
ret = request_irq(irq, timer8_interrupt,
IRQF_TIMER, timer8_priv.ced.name, &timer8_priv);
@@ -225,10 +227,10 @@ static void __init h8300_8timer_init(struct device_node *node)
pr_err("failed to request irq %d for clockevent\n", irq);
goto unmap_reg;
}
- rate = clk_get_rate(clk) / SCALE;
+
clockevents_config_and_register(&timer8_priv.ced, rate, 1, 0x0000ffff);
- return;
+ return;
unmap_reg:
iounmap(base);
free_clk:
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | [PATCH 60/69] clocksource/drivers/dw_apb_timer: Inline apbt_readl and apbt_writel |
| Message-ID | <qH4cG-6Lj-21@gated-at.bofh.it> |
| In reply to | #1294848 |
From: Jisheng Zhang <jszhang@marvell.com>
It seems gcc can automatically inline apbt_writel() for us, but
apbt_real isn't inlined. This patch makes them inline to get a trivial
performance improvement: 4096 rounds of __apbt_read_clocksource() call
spend time on Marvell BG4CT platform:
before the patch 1275240ns on average
after the patch 1263240ns on average
so we get 1% performance improvement.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/dw_apb_timer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clocksource/dw_apb_timer.c b/drivers/clocksource/dw_apb_timer.c
index 7f95b53..6334526 100644
--- a/drivers/clocksource/dw_apb_timer.c
+++ b/drivers/clocksource/dw_apb_timer.c
@@ -49,13 +49,13 @@ clocksource_to_dw_apb_clocksource(struct clocksource *cs)
return container_of(cs, struct dw_apb_clocksource, cs);
}
-static u32 apbt_readl(struct dw_apb_timer *timer, unsigned long offs)
+static inline u32 apbt_readl(struct dw_apb_timer *timer, unsigned long offs)
{
return readl(timer->base + offs);
}
-static void apbt_writel(struct dw_apb_timer *timer, u32 val,
- unsigned long offs)
+static inline void apbt_writel(struct dw_apb_timer *timer, u32 val,
+ unsigned long offs)
{
writel(val, timer->base + offs);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | [PATCH 65/69] clocksource/drivers/h8300: Change to overflow interrupt |
| Message-ID | <qH4cG-6Lj-23@gated-at.bofh.it> |
| In reply to | #1294848 |
From: Yoshinori Sato <ysato@users.sourceforge.jp>
Counter overflow detection use for overflow interrupt
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/h8300_timer16.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/clocksource/h8300_timer16.c b/drivers/clocksource/h8300_timer16.c
index fc14a3f..b14a8da 100644
--- a/drivers/clocksource/h8300_timer16.c
+++ b/drivers/clocksource/h8300_timer16.c
@@ -14,7 +14,6 @@
#include <linux/of_irq.h>
#define TSTR 0
-#define TISRA 4
#define TISRC 6
#define TCR 0
@@ -27,9 +26,8 @@ struct timer16_priv {
void __iomem *mapcommon;
unsigned short cs_enabled;
unsigned char enb;
- unsigned char imfa;
- unsigned char imiea;
unsigned char ovf;
+ unsigned char ovie;
struct clk *clk;
};
@@ -59,8 +57,8 @@ static irqreturn_t timer16_interrupt(int irq, void *dev_id)
{
struct timer16_priv *p = (struct timer16_priv *)dev_id;
- writeb(readb(p->mapcommon + TISRA) & ~p->imfa,
- p->mapcommon + TISRA);
+ writeb(readb(p->mapcommon + TISRC) & ~p->ovf,
+ p->mapcommon + TISRC);
p->total_cycles += 0x10000;
return IRQ_HANDLED;
@@ -93,6 +91,8 @@ static int timer16_enable(struct clocksource *cs)
writeb(0x83, p->mapbase + TCR);
writeb(readb(p->mapcommon + TSTR) | p->enb,
p->mapcommon + TSTR);
+ writeb(readb(p->mapcommon + TISRC) | p->ovie,
+ p->mapcommon + TSTR);
p->cs_enabled = true;
return 0;
@@ -161,8 +161,8 @@ static void __init h8300_16timer_init(struct device_node *node)
timer16_priv.mapbase = base[REG_CH];
timer16_priv.mapcommon = base[REG_COMM];
timer16_priv.enb = 1 << ch;
- timer16_priv.imfa = 1 << ch;
- timer16_priv.imiea = 1 << (4 + ch);
+ timer16_priv.ovf = 1 << ch;
+ timer16_priv.ovie = 1 << (4 + ch);
ret = request_irq(irq, timer16_interrupt,
IRQF_TIMER, timer16_priv.cs.name, &timer16_priv);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
Page 1 of 4 [1] 2 3 4 Next page →
Back to top | Article view | linux.kernel
csiph-web