aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2010-08-26 13:57:57 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2010-08-26 18:13:13 -0400
commit480125ba49ba62be93beea37770f266846e077ab (patch)
tree6e4437d77e352f5b03d1e00171bd77086378b01a /include
parent0444ad93ea2449963132d68753020a6a24d69895 (diff)
x86, iommu: Make all IOMMU's detection routines return a value.
We return 1 if the IOMMU has been detected. Zero or an error number if we failed to find it. This is in preperation of using the IOMMU_INIT so that we can detect whether an IOMMU is present. I have not tested this for regression on Calgary, nor on AMD Vi chipsets as I don't have that hardware. CC: Muli Ben-Yehuda <muli@il.ibm.com> CC: "Jon D. Mason" <jdmason@kudzu.us> CC: "Darrick J. Wong" <djwong@us.ibm.com> CC: Jesse Barnes <jbarnes@virtuousgeek.org> CC: David Woodhouse <David.Woodhouse@intel.com> CC: Chris Wright <chrisw@sous-sol.org> CC: Yinghai Lu <yinghai@kernel.org> CC: Joerg Roedel <joerg.roedel@amd.com> CC: H. Peter Anvin <hpa@zytor.com> CC: Fujita Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> LKML-Reference: <1282845485-8991-3-git-send-email-konrad.wilk@oracle.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dmar.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index d7cecc90ed34..a20602041511 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -57,15 +57,15 @@ extern int dmar_table_init(void);
57extern int dmar_dev_scope_init(void); 57extern int dmar_dev_scope_init(void);
58 58
59/* Intel IOMMU detection */ 59/* Intel IOMMU detection */
60extern void detect_intel_iommu(void); 60extern int detect_intel_iommu(void);
61extern int enable_drhd_fault_handling(void); 61extern int enable_drhd_fault_handling(void);
62 62
63extern int parse_ioapics_under_ir(void); 63extern int parse_ioapics_under_ir(void);
64extern int alloc_iommu(struct dmar_drhd_unit *); 64extern int alloc_iommu(struct dmar_drhd_unit *);
65#else 65#else
66static inline void detect_intel_iommu(void) 66static inline int detect_intel_iommu(void)
67{ 67{
68 return; 68 return -ENODEV;
69} 69}
70 70
71static inline int dmar_table_init(void) 71static inline int dmar_table_init(void)