mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
amd-iommu: add function to flush tlb for all domains
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
92ac4320af
commit
bfd1be1857
2 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,7 @@ extern int amd_iommu_init(void);
|
||||||
extern int amd_iommu_init_dma_ops(void);
|
extern int amd_iommu_init_dma_ops(void);
|
||||||
extern void amd_iommu_detect(void);
|
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);
|
||||||
#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) { }
|
||||||
|
|
|
@ -449,6 +449,17 @@ static void iommu_flush_domain(u16 domid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void amd_iommu_flush_all_domains(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 1; i < MAX_DOMAIN_ID; ++i) {
|
||||||
|
if (!test_bit(i, amd_iommu_pd_alloc_bitmap))
|
||||||
|
continue;
|
||||||
|
iommu_flush_domain(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* The functions below are used the create the page table mappings for
|
* The functions below are used the create the page table mappings for
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue