android_kernel_xiaomi_sm7250/drivers/clocksource
Keqian Zhu 21253ff57b 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:26:00 +01:00
..
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:26:00 +01:00
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c clocksource/drivers/asm9260: Add a check for of_clk_get 2020-01-04 19:12:44 +01:00
bcm2835_timer.c clocksource/drivers/bcm2835_timer: Fix memory leak of timer 2020-02-24 08:34:37 +01:00
bcm_kona_timer.c
cadence_ttc_timer.c clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent() 2020-12-30 11:25:59 +01:00
clksrc_st_lpc.c
clksrc-dbx500-prcmu.c
clps711x-timer.c
cs5535-clockevt.c
dummy_timer.c
dw_apb_timer_of.c clocksource: dw_apb_timer_of: Fix missing clockevent timers 2020-06-22 09:05:11 +02:00
dw_apb_timer.c clocksource: dw_apb_timer: Make CPU-affiliation being optional 2020-06-22 09:05:11 +02:00
em_sti.c
exynos_mct.c clocksource/drivers/exynos_mct: Fix error path in timer resources initialization 2020-01-27 14:50:27 +01:00
fsl_ftm_timer.c
h8300_timer8.c clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() 2020-10-01 13:14:51 +02:00
h8300_timer16.c
h8300_tpu.c
i8253.c
jcore-pit.c
Kconfig
Makefile
meson6_timer.c
mips-gic-timer.c
mmio.c
mps2-timer.c
mxs_timer.c
nomadik-mtu.c
numachip.c
owl-timer.c
pxa_timer.c
qcom-timer.c
renesas-ostm.c
riscv_timer.c
rockchip_timer.c
samsung_pwm_timer.c
scx200_hrt.c
sh_cmt.c
sh_mtu2.c
sh_tmu.c
sun4i_timer.c
tango_xtal.c
tcb_clksrc.c
tegra20_timer.c
time-armada-370-xp.c
time-efm32.c
time-lpc32xx.c
time-orion.c
time-pistachio.c
timer-atcpit100.c
timer-atlas7.c
timer-atmel-pit.c
timer-atmel-st.c
timer-digicolor.c
timer-fttmr010.c
timer-imx-gpt.c
timer-imx-tpm.c
timer-integrator-ap.c
timer-keystone.c
timer-mediatek.c
timer-npcm7xx.c
timer-nps.c
timer-of.c clocksource/drivers/timer-of: Use unique device name instead of timer 2020-01-04 19:12:45 +01:00
timer-of.h
timer-oxnas-rps.c
timer-prima2.c
timer-probe.c
timer-sp804.c
timer-sp.h
timer-sprd.c
timer-stm32.c
timer-sun5i.c clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable 2020-01-27 14:50:27 +01:00
timer-ti-32k.c
timer-ti-dm.c bus: ti-sysc: Fix timer handling with drop pm_runtime_irq_safe() 2020-01-27 14:50:16 +01:00
timer-u300.c
versatile.c
vf_pit_timer.c
vt8500_timer.c
zevio-timer.c