linux/drivers/clocksource
Chen-Yu Tsai 5fa42205ab clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function
commit b53e7d000d upstream.

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.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-24 10:07:35 +02:00
..
acpi_pm.c
arm_arch_timer.c
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c
bcm_kona_timer.c
bcm2835_timer.c
cadence_ttc_timer.c
clksrc_st_lpc.c
clksrc-dbx500-prcmu.c
clksrc-probe.c
clps711x-timer.c
cs5535-clockevt.c
dummy_timer.c
dw_apb_timer_of.c
dw_apb_timer.c
em_sti.c
exynos_mct.c
fsl_ftm_timer.c clocksource/fsl: Avoid harmless 64-bit warnings 2015-11-16 19:07:08 +01:00
h8300_timer8.c
h8300_timer16.c
h8300_tpu.c
i8253.c
Kconfig clocksource: Disallow drivers for ARCH_USES_GETTIMEOFFSET 2015-11-16 19:07:08 +01:00
Makefile
meson6_timer.c
metag_generic.c
mips-gic-timer.c
mmio.c clocksource: Mmio: remove artificial 32bit limitation 2015-12-10 19:37:18 +01:00
moxart_timer.c
mtk_timer.c
mxs_timer.c
nomadik-mtu.c
numachip.c
pxa_timer.c
qcom-timer.c
rockchip_timer.c
samsung_pwm_timer.c
scx200_hrt.c
sh_cmt.c
sh_mtu2.c
sh_tmu.c
sun4i_timer.c clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function 2016-09-24 10:07:35 +02:00
tango_xtal.c
tcb_clksrc.c clockevents/tcb_clksrc: Prevent disabling an already disabled clock 2016-03-03 15:07:15 -08:00
tegra20_timer.c
time-armada-370-xp.c
time-efm32.c
time-lpc32xx.c
time-orion.c
time-pistachio.c
timer-atlas7.c
timer-atmel-pit.c
timer-atmel-st.c
timer-digicolor.c
timer-imx-gpt.c
timer-integrator-ap.c
timer-keystone.c
timer-prima2.c
timer-sp.h
timer-sp804.c
timer-stm32.c
timer-sun5i.c
timer-ti-32k.c
timer-u300.c
versatile.c
vf_pit_timer.c
vt8500_timer.c clocksource/drivers/vt8500: Increase the minimum delta 2016-03-03 15:07:11 -08:00
zevio-timer.c