]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/riscv: Add shutdown function for iommu driver
authorXu Lu <luxu.kernel@bytedance.com>
Fri, 3 Jan 2025 09:32:20 +0000 (17:32 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 6 Jan 2025 11:38:11 +0000 (12:38 +0100)
commit77a44196abfb39e183be554003e9ee76d95edab1
tree27f5f831f7122393505027ef007f0982a28728e0
parent8d8d3752c0a4f7fb072352837cbdbf57c02df239
iommu/riscv: Add shutdown function for iommu driver

This commit supplies shutdown callback for iommu driver. The shutdown
callback resets necessary registers so that newly booted kernel can pass
riscv_iommu_init_check() after kexec. Also, the shutdown callback resets
iommu mode to bare instead of off so that new kernel can still use PCIE
devices even when CONFIG_RISCV_IOMMU is not enabled.

Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
Link: https://lore.kernel.org/r/20250103093220.38106-3-luxu.kernel@bytedance.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/riscv/iommu-pci.c
drivers/iommu/riscv/iommu-platform.c
drivers/iommu/riscv/iommu.c
drivers/iommu/riscv/iommu.h