summaryrefslogtreecommitdiff
path: root/mm/hwpoison-inject.c
diff options
context:
space:
mode:
authorWalter Chang <walter.chang@mediatek.com>2023-07-17 12:07:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-19 13:28:04 +0300
commitde43bc17987d12060426e640017793c638243c27 (patch)
treee1e514995b7c45f2070850ee7a31f65711c922db /mm/hwpoison-inject.c
parentf2953184bf1960ff0f1268c613d58f5d74db1ea4 (diff)
downloadlinux-de43bc17987d12060426e640017793c638243c27.tar.xz
clocksource/drivers/arm_arch_timer: Disable timer before programming CVAL
commit e7d65e40ab5a5940785c5922f317602d0268caaf upstream. Due to the fact that the use of `writeq_relaxed()` to program CVAL is not guaranteed to be atomic, it is necessary to disable the timer before programming CVAL. However, if the MMIO timer is already enabled and has not yet expired, there is a possibility of unexpected behavior occurring: when the CPU enters the idle state during this period, and if the CPU's local event is earlier than the broadcast event, the following process occurs: tick_broadcast_enter() tick_broadcast_oneshot_control(TICK_BROADCAST_ENTER) __tick_broadcast_oneshot_control() ___tick_broadcast_oneshot_control() tick_broadcast_set_event() clockevents_program_event() set_next_event_mem() During this process, the MMIO timer remains enabled while programming CVAL. To prevent such behavior, disable timer explicitly prior to programming CVAL. Fixes: 8b82c4f883a7 ("clocksource/drivers/arm_arch_timer: Move MMIO timer programming over to CVAL") Cc: stable@vger.kernel.org Signed-off-by: Walter Chang <walter.chang@mediatek.com> Acked-by: Marc Zyngier <maz@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230717090735.19370-1-walter.chang@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/hwpoison-inject.c')
0 files changed, 0 insertions, 0 deletions