summaryrefslogtreecommitdiff
path: root/include/linux/dma_remapping.h
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2008-11-20 18:49:45 +0300
committerJoerg Roedel <joerg.roedel@amd.com>2009-01-03 13:57:35 +0300
commit7a8fc25e0cc6e75fa6fdb0a856490e324218550b (patch)
treedca6863ae93cc141a20599e8943c9f74e3bd7384 /include/linux/dma_remapping.h
parent46b08e1a76b758193b0e7b889c6486a16eb1e9e2 (diff)
downloadlinux-7a8fc25e0cc6e75fa6fdb0a856490e324218550b.tar.xz
intel-iommu: move context entry defs out from dma_remapping.h
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.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index d8521662a495..9a88f7d0262f 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -12,44 +12,6 @@
struct root_entry;
/*
- * low 64 bits:
- * 0: present
- * 1: fault processing disable
- * 2-3: translation type
- * 12-63: address space root
- * high 64 bits:
- * 0-2: address width
- * 3-6: aval
- * 8-23: domain id
- */
-struct context_entry {
- u64 lo;
- u64 hi;
-};
-#define context_present(c) ((c).lo & 1)
-#define context_fault_disable(c) (((c).lo >> 1) & 1)
-#define context_translation_type(c) (((c).lo >> 2) & 3)
-#define context_address_root(c) ((c).lo & VTD_PAGE_MASK)
-#define context_address_width(c) ((c).hi & 7)
-#define context_domain_id(c) (((c).hi >> 8) & ((1 << 16) - 1))
-
-#define context_set_present(c) do {(c).lo |= 1;} while (0)
-#define context_set_fault_enable(c) \
- do {(c).lo &= (((u64)-1) << 2) | 1;} while (0)
-#define context_set_translation_type(c, val) \
- do { \
- (c).lo &= (((u64)-1) << 4) | 3; \
- (c).lo |= ((val) & 3) << 2; \
- } while (0)
-#define CONTEXT_TT_MULTI_LEVEL 0
-#define context_set_address_root(c, val) \
- do {(c).lo |= (val) & VTD_PAGE_MASK; } while (0)
-#define context_set_address_width(c, val) do {(c).hi |= (val) & 7;} while (0)
-#define context_set_domain_id(c, val) \
- do {(c).hi |= ((val) & ((1 << 16) - 1)) << 8;} while (0)
-#define context_clear_entry(c) do {(c).lo = 0; (c).hi = 0;} while (0)
-
-/*
* 0: readable
* 1: writable
* 2-6: reserved