clocksource/drivers/arm_arch_timer: Fix MMIO base address vs callback ordering issue
authorMarc Zyngier <maz@kernel.org>
Sun, 17 Oct 2021 12:42:14 +0000 (13:42 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sun, 17 Oct 2021 19:47:15 +0000 (21:47 +0200)
commit72f47a3f0ea4cda4ca5d90c0d6043f697b9b0647
treed70ace8e5fd8ad6a63e264ac10c552464ceb7f13
parentac9ef4f24cb2313fb047f2097396204b033799b8
clocksource/drivers/arm_arch_timer: Fix MMIO base address vs callback ordering issue

The MMIO timer base address gets published after we have registered
the callbacks and the interrupt handler, which is... a bit dangerous.

Fix this by moving the base address publication to the point where
we register the timer, and expose a pointer to the timer structure
itself rather than a naked value.

Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211017124225.3018098-7-maz@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/arm_arch_timer.c