aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-06-09 01:20:30 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-06-12 05:33:52 -0400
commitbf56027ff4d9e75bf668ae990fe6204d00a23002 (patch)
tree010c7dd60d8f33ea248185589fd0916760f171be
parent3bf17472226b0041b0c61363bd57a5cadbe620c4 (diff)
iommu: dmar: Provide helper to copy shared irte fields
Instead of open coding, provide a helper function to copy the shared irte fields. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: jiang.liu@linux.intel.com Cc: iommu@lists.linux-foundation.org Cc: joro@8bytes.org Cc: dwmw2@infradead.org Link: http://lkml.kernel.org/r/1433827237-3382-4-git-send-email-feng.wu@intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/linux/dmar.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 0dbcabcb5f0d..e9bc9292bd3a 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -249,6 +249,18 @@ struct irte {
249 }; 249 };
250}; 250};
251 251
252static inline void dmar_copy_shared_irte(struct irte *dst, struct irte *src)
253{
254 dst->present = src->present;
255 dst->fpd = src->fpd;
256 dst->avail = src->avail;
257 dst->pst = src->pst;
258 dst->vector = src->vector;
259 dst->sid = src->sid;
260 dst->sq = src->sq;
261 dst->svt = src->svt;
262}
263
252#define PDA_LOW_BIT 26 264#define PDA_LOW_BIT 26
253#define PDA_HIGH_BIT 32 265#define PDA_HIGH_BIT 32
254 266