amd-iommu: add function to disable all iommus
This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
parent
d91cecdd79
commit
92ac4320af
@ -252,6 +252,11 @@ static void __init iommu_enable(struct amd_iommu *iommu)
|
|||||||
iommu_feature_enable(iommu, CONTROL_IOMMU_EN);
|
iommu_feature_enable(iommu, CONTROL_IOMMU_EN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void iommu_disable(struct amd_iommu *iommu)
|
||||||
|
{
|
||||||
|
iommu_feature_disable(iommu, CONTROL_IOMMU_EN);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mapping and unmapping functions for the IOMMU MMIO space. Each AMD IOMMU in
|
* mapping and unmapping functions for the IOMMU MMIO space. Each AMD IOMMU in
|
||||||
* the system has one.
|
* the system has one.
|
||||||
@ -945,6 +950,14 @@ static void __init enable_iommus(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void disable_iommus(void)
|
||||||
|
{
|
||||||
|
struct amd_iommu *iommu;
|
||||||
|
|
||||||
|
for_each_iommu(iommu)
|
||||||
|
iommu_disable(iommu);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Suspend/Resume support
|
* Suspend/Resume support
|
||||||
* disable suspend until real resume implemented
|
* disable suspend until real resume implemented
|
||||||
|
Loading…
Reference in New Issue
Block a user