[tip:x86/apic] iommu, x86: Add cap_pi_support() to detect VT-d PI capability
From: tip-bot for Feng Wu
Date: Fri Jun 12 2015 - 05:50:49 EST
Commit-ID: 07c09787b26db724c94a912a572a9a4fa66008f3
Gitweb: http://git.kernel.org/tip/07c09787b26db724c94a912a572a9a4fa66008f3
Author: Feng Wu <feng.wu@xxxxxxxxx>
AuthorDate: Tue, 9 Jun 2015 13:20:34 +0800
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Fri, 12 Jun 2015 11:33:52 +0200
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 <feng.wu@xxxxxxxxx>
Reviewed-by: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Acked-by: David Woodhouse <David.Woodhouse@xxxxxxxxx>
Acked-by: Joerg Roedel <joro@xxxxxxxxxx>
Cc: iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
Cc: dwmw2@xxxxxxxxxxxxx
Link: http://lkml.kernel.org/r/1433827237-3382-8-git-send-email-feng.wu@xxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/linux/intel-iommu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 0af9b03..0c251be 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/