aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/amd_iommu_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h
index 97f3d09d3be5..1b4b3d6c9f04 100644
--- a/arch/x86/include/asm/amd_iommu_types.h
+++ b/arch/x86/include/asm/amd_iommu_types.h
@@ -160,6 +160,10 @@
160 ((1ULL << PM_LEVEL_SHIFT((x))) - 1): \ 160 ((1ULL << PM_LEVEL_SHIFT((x))) - 1): \
161 (0xffffffffffffffffULL)) 161 (0xffffffffffffffffULL))
162#define PM_LEVEL_INDEX(x, a) (((a) >> PM_LEVEL_SHIFT((x))) & 0x1ffULL) 162#define PM_LEVEL_INDEX(x, a) (((a) >> PM_LEVEL_SHIFT((x))) & 0x1ffULL)
163#define PM_LEVEL_ENC(x) (((x) << 9) & 0xe00ULL)
164#define PM_LEVEL_PDE(x, a) ((a) | PM_LEVEL_ENC((x)) | \
165 IOMMU_PTE_P | IOMMU_PTE_IR | IOMMU_PTE_IW)
166
163 167
164#define IOMMU_PTE_L2_INDEX(address) (((address) >> 30) & 0x1ffULL) 168#define IOMMU_PTE_L2_INDEX(address) (((address) >> 30) & 0x1ffULL)
165#define IOMMU_PTE_L1_INDEX(address) (((address) >> 21) & 0x1ffULL) 169#define IOMMU_PTE_L1_INDEX(address) (((address) >> 21) & 0x1ffULL)