aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/amd_iommu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 8a0fd3d09973..0922d5fe633c 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -571,6 +571,18 @@ static u16 domain_id_alloc(void)
571 return id; 571 return id;
572} 572}
573 573
574#ifdef CONFIG_IOMMU_API
575static void domain_id_free(int id)
576{
577 unsigned long flags;
578
579 write_lock_irqsave(&amd_iommu_devtable_lock, flags);
580 if (id > 0 && id < MAX_DOMAIN_ID)
581 __clear_bit(id, amd_iommu_pd_alloc_bitmap);
582 write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
583}
584#endif
585
574/* 586/*
575 * Used to reserve address ranges in the aperture (e.g. for exclusion 587 * Used to reserve address ranges in the aperture (e.g. for exclusion
576 * ranges. 588 * ranges.