mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-12 08:00:09 +00:00
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>
This commit is contained in:
parent
92db1e6af7
commit
0975904276
@ -29,9 +29,11 @@ extern void amd_iommu_detect(void);
|
|||||||
extern irqreturn_t amd_iommu_int_handler(int irq, void *data);
|
extern irqreturn_t amd_iommu_int_handler(int irq, void *data);
|
||||||
extern void amd_iommu_flush_all_domains(void);
|
extern void amd_iommu_flush_all_domains(void);
|
||||||
extern void amd_iommu_flush_all_devices(void);
|
extern void amd_iommu_flush_all_devices(void);
|
||||||
|
extern void amd_iommu_shutdown(void);
|
||||||
#else
|
#else
|
||||||
static inline int amd_iommu_init(void) { return -ENODEV; }
|
static inline int amd_iommu_init(void) { return -ENODEV; }
|
||||||
static inline void amd_iommu_detect(void) { }
|
static inline void amd_iommu_detect(void) { }
|
||||||
|
static inline void amd_iommu_shutdown(void) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _ASM_X86_AMD_IOMMU_H */
|
#endif /* _ASM_X86_AMD_IOMMU_H */
|
||||||
|
@ -1273,6 +1273,11 @@ free:
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void amd_iommu_shutdown(void)
|
||||||
|
{
|
||||||
|
disable_iommus();
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* Early detect code. This code runs at IOMMU detection time in the DMA
|
* Early detect code. This code runs at IOMMU detection time in the DMA
|
||||||
|
@ -290,6 +290,8 @@ static int __init pci_iommu_init(void)
|
|||||||
void pci_iommu_shutdown(void)
|
void pci_iommu_shutdown(void)
|
||||||
{
|
{
|
||||||
gart_iommu_shutdown();
|
gart_iommu_shutdown();
|
||||||
|
|
||||||
|
amd_iommu_shutdown();
|
||||||
}
|
}
|
||||||
/* Must execute after PCI subsystem */
|
/* Must execute after PCI subsystem */
|
||||||
fs_initcall(pci_iommu_init);
|
fs_initcall(pci_iommu_init);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user