linux/drivers/clocksource
Keqian Zhu 3b6ba2fe65 clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI
[ Upstream commit 8b7770b877d187bfdae1eaf587bd2b792479a31c ]

ARM virtual counter supports event stream, it can only trigger an event
when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 changes,
so the actual period of event stream is 2^(cntkctl_evnti + 1). For example,
when the trigger bit is 0, then virtual counter trigger an event for every
two cycles.

While we're at it, rework the way we compute the trigger bit position
by making it more obvious that when bits [n:n-1] are both set (with n
being the most significant bit), we pick bit (n + 1).

Fixes: 037f637767 ("drivers: clocksource: add support for ARM architected timer event stream")
Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201204073126.6920-3-zhukeqian1@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:19 +01:00
..
Kconfig
Makefile
acpi_pm.c
arc_timer.c
arm_arch_timer.c clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI 2020-12-30 11:51:19 +01:00
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c
bcm2835_timer.c
bcm_kona_timer.c
clksrc-dbx500-prcmu.c
clksrc_st_lpc.c
clps711x-timer.c
dummy_timer.c
dw_apb_timer.c clocksource: dw_apb_timer: Make CPU-affiliation being optional 2020-06-22 09:30:55 +02:00
dw_apb_timer_of.c clocksource: dw_apb_timer_of: Fix missing clockevent timers 2020-06-22 09:30:55 +02:00
em_sti.c
exynos_mct.c
h8300_timer8.c clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() 2020-10-01 13:18:16 +02:00
h8300_timer16.c
h8300_tpu.c
hyperv_timer.c clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources 2020-04-01 11:02:12 +02:00
i8253.c
ingenic-timer.c
jcore-pit.c
mips-gic-timer.c
mmio.c
mps2-timer.c
mxs_timer.c
nomadik-mtu.c
numachip.c
renesas-ostm.c
samsung_pwm_timer.c
scx200_hrt.c
sh_cmt.c
sh_mtu2.c
sh_tmu.c
timer-armada-370-xp.c
timer-atcpit100.c
timer-atlas7.c
timer-atmel-pit.c
timer-atmel-st.c
timer-atmel-tcb.c
timer-cadence-ttc.c clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent() 2020-12-30 11:51:17 +01:00
timer-cs5535.c
timer-davinci.c clocksource: davinci: only enable clockevents once tim34 is initialized 2020-02-24 08:36:46 +01:00
timer-digicolor.c
timer-efm32.c
timer-fsl-ftm.c
timer-fttmr010.c
timer-gx6605s.c clocksource/drivers/timer-gx6605s: Fixup counter reload 2020-10-07 08:01:25 +02:00
timer-imx-gpt.c
timer-imx-sysctr.c
timer-imx-tpm.c
timer-integrator-ap.c
timer-ixp4xx.c
timer-keystone.c
timer-lpc32xx.c
timer-mediatek.c
timer-meson6.c
timer-milbeaut.c
timer-mp-csky.c
timer-npcm7xx.c
timer-nps.c
timer-of.c
timer-of.h
timer-orion.c clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path 2020-12-30 11:51:17 +01:00
timer-owl.c
timer-oxnas-rps.c
timer-pistachio.c
timer-prima2.c
timer-probe.c
timer-pxa.c
timer-qcom.c
timer-rda.c
timer-riscv.c
timer-rockchip.c
timer-sp.h
timer-sp804.c
timer-sprd.c
timer-stm32.c
timer-sun4i.c
timer-sun5i.c
timer-tango-xtal.c
timer-tegra.c
timer-ti-32k.c
timer-ti-dm.c
timer-u300.c
timer-versatile.c
timer-vf-pit.c
timer-vt8500.c
timer-zevio.c