From: Feng Wu Date: Tue, 9 Jun 2015 05:20:34 +0000 (+0800) Subject: iommu, x86: Add cap_pi_support() to detect VT-d PI capability X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=07c09787b26db724c94a912a572a9a4fa66008f3;p=linux-beck.git iommu, x86: Add cap_pi_support() to detect VT-d PI capability Add helper function to detect VT-d Posted-Interrupts capability. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu Reviewed-by: Thomas Gleixner Acked-by: David Woodhouse Acked-by: Joerg Roedel Cc: iommu@lists.linux-foundation.org Cc: dwmw2@infradead.org Link: http://lkml.kernel.org/r/1433827237-3382-8-git-send-email-feng.wu@intel.com Signed-off-by: Thomas Gleixner --- diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 0af9b03e2b1c..0c251be39836 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h @@ -87,6 +87,7 @@ static inline void dmar_writeq(void __iomem *addr, u64 val) /* * Decoding Capability Register */ +#define cap_pi_support(c) (((c) >> 59) & 1) #define cap_read_drain(c) (((c) >> 55) & 1) #define cap_write_drain(c) (((c) >> 54) & 1) #define cap_max_amask_val(c) (((c) >> 48) & 0x3f)