diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-02 11:56:36 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 08:11:54 -0500 |
commit | 863c74ebd0152b21bc4b11c1447b5d1429287d37 (patch) | |
tree | a679b7a5754e365635b000fe4b529e181d773e02 /arch/x86/kernel/amd_iommu.c | |
parent | 5b28df6f43ac9878f310ad0cb7f11ddb262a7ac6 (diff) |
AMD IOMMU: add device reference counting for protection domains
Impact: know how many devices are assigned to a domain
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 5c465c91150e..8b45bc49d1c5 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -825,9 +825,10 @@ static void set_device_domain(struct amd_iommu *iommu, | |||
825 | u16 devid) | 825 | u16 devid) |
826 | { | 826 | { |
827 | unsigned long flags; | 827 | unsigned long flags; |
828 | |||
829 | u64 pte_root = virt_to_phys(domain->pt_root); | 828 | u64 pte_root = virt_to_phys(domain->pt_root); |
830 | 829 | ||
830 | domain->dev_cnt += 1; | ||
831 | |||
831 | pte_root |= (domain->mode & DEV_ENTRY_MODE_MASK) | 832 | pte_root |= (domain->mode & DEV_ENTRY_MODE_MASK) |
832 | << DEV_ENTRY_MODE_SHIFT; | 833 | << DEV_ENTRY_MODE_SHIFT; |
833 | pte_root |= IOMMU_PTE_IR | IOMMU_PTE_IW | IOMMU_PTE_P | IOMMU_PTE_TV; | 834 | pte_root |= IOMMU_PTE_IR | IOMMU_PTE_IW | IOMMU_PTE_P | IOMMU_PTE_TV; |