iommu/ipmmu-vmsa: Add suspend/resume support
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 27 May 2019 11:52:53 +0000 (13:52 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 3 Jun 2019 10:18:03 +0000 (12:18 +0200)
commitda38e9ec9c2d0ebec1499b5961baffd08f8ca062
treee977a6ab13fe8407d580604d7ecd20ea5f5871d3
parent892db541cc68eb39d7813af34f33ce74a0014a1d
iommu/ipmmu-vmsa: Add suspend/resume support

During PSCI system suspend, R-Car Gen3 SoCs are powered down, and all
IPMMU state is lost.  Hence after s2ram, devices wired behind an IPMMU,
and configured to use it, will see their DMA operations hang.

To fix this, restore all IPMMU contexts, and re-enable all active
micro-TLBs during system resume.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/ipmmu-vmsa.c