diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-06-09 17:52:27 +0200 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-06-15 15:20:40 +0200 |
commit | 0975904276552c8e201dad0ad31152ba8a21505a (patch) | |
tree | c7db491abe7dcb001c46ad30341475755f5b07ca /arch/x86/kernel | |
parent | 92db1e6af747faa129e236d68386af26a0efc12b (diff) | |
download | lwn-0975904276552c8e201dad0ad31152ba8a21505a.tar.gz lwn-0975904276552c8e201dad0ad31152ba8a21505a.zip |
amd-iommu: disable IOMMU hardware on shutdown
When the IOMMU stays enabled the BIOS may not be able to finish the
machine shutdown properly. So disable the hardware on shutdown.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 238989ec077d..575ca46211bb 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c @@ -1273,6 +1273,11 @@ free: goto out; } +void amd_iommu_shutdown(void) +{ + disable_iommus(); +} + /**************************************************************************** * * Early detect code. This code runs at IOMMU detection time in the DMA diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 745579bc8256..328592fb6044 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -290,6 +290,8 @@ static int __init pci_iommu_init(void) void pci_iommu_shutdown(void) { gart_iommu_shutdown(); + + amd_iommu_shutdown(); } /* Must execute after PCI subsystem */ fs_initcall(pci_iommu_init); |