diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-08-31 10:01:48 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-03 10:15:43 -0400 |
commit | aa879fff5d12318259816aa35023e941a1e4d3d9 (patch) | |
tree | 150412d34e3aca54d623a63cd0a390d5358f8712 /arch/x86/kernel/amd_iommu.c | |
parent | 0feae533ddebe02cda6ccce5cac7349b446776a8 (diff) |
x86/amd-iommu: Fix device table write order
The V bit of the device table entry has to be set after the
rest of the entry is written to not confuse the hardware.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 7987f20499ad..2b1e77c714ff 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -1087,9 +1087,9 @@ static void __attach_device(struct amd_iommu *iommu, | |||
1087 | pte_root |= IOMMU_PTE_IR | IOMMU_PTE_IW | IOMMU_PTE_P | IOMMU_PTE_TV; | 1087 | pte_root |= IOMMU_PTE_IR | IOMMU_PTE_IW | IOMMU_PTE_P | IOMMU_PTE_TV; |
1088 | 1088 | ||
1089 | write_lock_irqsave(&amd_iommu_devtable_lock, flags); | 1089 | write_lock_irqsave(&amd_iommu_devtable_lock, flags); |
1090 | amd_iommu_dev_table[devid].data[0] = lower_32_bits(pte_root); | ||
1091 | amd_iommu_dev_table[devid].data[1] = upper_32_bits(pte_root); | ||
1092 | amd_iommu_dev_table[devid].data[2] = domain->id; | 1090 | amd_iommu_dev_table[devid].data[2] = domain->id; |
1091 | amd_iommu_dev_table[devid].data[1] = upper_32_bits(pte_root); | ||
1092 | amd_iommu_dev_table[devid].data[0] = lower_32_bits(pte_root); | ||
1093 | 1093 | ||
1094 | amd_iommu_pd_table[devid] = domain; | 1094 | amd_iommu_pd_table[devid] = domain; |
1095 | write_unlock_irqrestore(&amd_iommu_devtable_lock, flags); | 1095 | write_unlock_irqrestore(&amd_iommu_devtable_lock, flags); |