From 8e9858119afbfe858aba268b9eb7a99fe0c0522f Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Tue, 5 May 2009 15:33:57 +0200 Subject: [PATCH] --- yaml --- r: 145903 b: refs/heads/master c: bfd1be1857e5a3385bf146e02e6dc3dd4241bec1 h: refs/heads/master i: 145901: 6f3d6b424396c741c888c79d128bf9b22eb644e3 145899: 8110f0b51eb716feb0b619b313ab393f5701dc09 145895: 254372321e2218f70c7d17f2760bb2e7a4a9c993 145887: 8a20800be67f1955d0b640b87ffbc6694324b0c6 v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/amd_iommu.h | 1 + trunk/arch/x86/kernel/amd_iommu.c | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index da0ceaba80a9..5941d5f9e3f7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 92ac4320af6ed4294c2c221dd4ccbfd9026a3aa7 +refs/heads/master: bfd1be1857e5a3385bf146e02e6dc3dd4241bec1 diff --git a/trunk/arch/x86/include/asm/amd_iommu.h b/trunk/arch/x86/include/asm/amd_iommu.h index f712344329bc..1750e1f85d3c 100644 --- a/trunk/arch/x86/include/asm/amd_iommu.h +++ b/trunk/arch/x86/include/asm/amd_iommu.h @@ -27,6 +27,7 @@ extern int amd_iommu_init(void); extern int amd_iommu_init_dma_ops(void); extern void amd_iommu_detect(void); extern irqreturn_t amd_iommu_int_handler(int irq, void *data); +extern void amd_iommu_flush_all_domains(void); #else static inline int amd_iommu_init(void) { return -ENODEV; } static inline void amd_iommu_detect(void) { } diff --git a/trunk/arch/x86/kernel/amd_iommu.c b/trunk/arch/x86/kernel/amd_iommu.c index d9e9dc141a1e..826ad079efc4 100644 --- a/trunk/arch/x86/kernel/amd_iommu.c +++ b/trunk/arch/x86/kernel/amd_iommu.c @@ -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