]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend
authorXu Qiang <xuqiang36@huawei.com>
Sat, 7 Nov 2020 10:42:26 +0000 (10:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:38 +0000 (11:25 +0100)
commit0c486401a3dbce692a5c82f10518ae96a259f5f2
treea0d15b256a68020bb7a4052a003c01de791d9141
parenta0e74c97fe3f0affa3d1d9f0527894e153c1605a
irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend

[ Upstream commit 74cde1a53368aed4f2b4b54bf7030437f64a534b ]

On systems without HW-based collections (i.e. anything except GIC-500),
we rely on firmware to perform the ITS save/restore. This doesn't
really work, as although FW can properly save everything, it cannot
fully restore the state of the command queue (the read-side is reset
to the head of the queue). This results in the ITS consuming previously
processed commands, potentially corrupting the state.

Instead, let's always save the ITS state on suspend, disabling it in the
process, and restore the full state on resume. This saves us from broken
FW as long as it doesn't enable the ITS by itself (for which we can't do
anything).

This amounts to simply dropping the ITS_FLAGS_SAVE_SUSPEND_STATE.

Signed-off-by: Xu Qiang <xuqiang36@huawei.com>
[maz: added warning on resume, rewrote commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201107104226.14282-1-xuqiang36@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/irqchip/irq-gic-v3-its.c