summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sun/sunqe.h
diff options
context:
space:
mode:
authorTomas Krcka <krckatom@amazon.de>2023-03-29 12:34:19 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-30 12:44:04 +0100
commit9fcef1e37d546355ec4900adefb649633af37365 (patch)
tree2c9b823e6f6bf06407407d82d581ed92f9adc4f1 /drivers/net/ethernet/sun/sunqe.h
parent4461f41ece4db4c44ef9c01db48c820696f54040 (diff)
iommu/arm-smmu-v3: Acknowledge pri/event queue overflow if any
[ Upstream commit 67ea0b7ce41844eae7c10bb04dfe66a23318c224 ] When an overflow occurs in the PRI queue, the SMMU toggles the overflow flag in the PROD register. To exit the overflow condition, the PRI thread is supposed to acknowledge it by toggling this flag in the CONS register. Unacknowledged overflow causes the queue to stop adding anything new. Currently, the priq thread always writes the CONS register back to the SMMU after clearing the queue. The writeback is not necessary if the OVFLG in the PROD register has not been changed, no overflow has occured. This commit checks the difference of the overflow flag between CONS and PROD register. If it's different, toggles the OVACKFLG flag in the CONS register and write it to the SMMU. The situation is similar for the event queue. The acknowledge register is also toggled after clearing the event queue but never propagated to the hardware. This would only be done the next time when executing evtq thread. Unacknowledged event queue overflow doesn't affect the event queue, because the SMMU still adds elements to that queue when the overflow condition is active. But it feel nicer to keep SMMU in sync when possible, so use the same way here as well. Signed-off-by: Tomas Krcka <krckatom@amazon.de> Link: https://lore.kernel.org/r/20230329123420.34641-1-tomas.krcka@gmail.com Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/sun/sunqe.h')
0 files changed, 0 insertions, 0 deletions