diff options
author | Mark McLoughlin <markmc@redhat.com> | 2008-11-20 10:49:46 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 05:57:35 -0500 |
commit | 622ba12a4c2148999bda9b891bfd0c6ddcb6c57e (patch) | |
tree | 89d68fa316e9aaa23005280c2720b1aed889fa9f /include/linux/dma_remapping.h | |
parent | 7a8fc25e0cc6e75fa6fdb0a856490e324218550b (diff) |
intel-iommu: move DMA PTE defs out of dma_remapping.h
DMA_PTE_READ/WRITE are needed by kvm.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/dma_remapping.h')
-rw-r--r-- | include/linux/dma_remapping.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h index 9a88f7d0262f..9d5874e3bec9 100644 --- a/include/linux/dma_remapping.h +++ b/include/linux/dma_remapping.h | |||
@@ -11,31 +11,9 @@ | |||
11 | 11 | ||
12 | struct root_entry; | 12 | struct root_entry; |
13 | 13 | ||
14 | /* | ||
15 | * 0: readable | ||
16 | * 1: writable | ||
17 | * 2-6: reserved | ||
18 | * 7: super page | ||
19 | * 8-11: available | ||
20 | * 12-63: Host physcial address | ||
21 | */ | ||
22 | struct dma_pte { | ||
23 | u64 val; | ||
24 | }; | ||
25 | #define dma_clear_pte(p) do {(p).val = 0;} while (0) | ||
26 | |||
27 | #define DMA_PTE_READ (1) | 14 | #define DMA_PTE_READ (1) |
28 | #define DMA_PTE_WRITE (2) | 15 | #define DMA_PTE_WRITE (2) |
29 | 16 | ||
30 | #define dma_set_pte_readable(p) do {(p).val |= DMA_PTE_READ;} while (0) | ||
31 | #define dma_set_pte_writable(p) do {(p).val |= DMA_PTE_WRITE;} while (0) | ||
32 | #define dma_set_pte_prot(p, prot) \ | ||
33 | do {(p).val = ((p).val & ~3) | ((prot) & 3); } while (0) | ||
34 | #define dma_pte_addr(p) ((p).val & VTD_PAGE_MASK) | ||
35 | #define dma_set_pte_addr(p, addr) do {\ | ||
36 | (p).val |= ((addr) & VTD_PAGE_MASK); } while (0) | ||
37 | #define dma_pte_present(p) (((p).val & 3) != 0) | ||
38 | |||
39 | struct intel_iommu; | 17 | struct intel_iommu; |
40 | 18 | ||
41 | struct dmar_domain { | 19 | struct dmar_domain { |