blob: e4a552d44465b88b0f422a5cb51fcfba23598751 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_IOMMU_H
2#define _ASM_X86_IOMMU_H
Yinghai Luf2cf8e02007-07-21 17:11:31 +02003
4extern void pci_iommu_shutdown(void);
5extern void no_iommu_init(void);
Alexis Bruemmer1956a962008-07-25 19:44:51 -07006extern struct dma_mapping_ops nommu_dma_ops;
Yinghai Luf2cf8e02007-07-21 17:11:31 +02007extern int force_iommu, no_iommu;
8extern int iommu_detected;
David Woodhousee51af662008-09-04 09:54:37 +01009extern int dmar_disabled;
FUJITA Tomonorie93be882008-07-10 08:27:49 +090010
Joerg Roedelbdab0ba2008-10-15 22:02:07 -070011extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
FUJITA Tomonori8978b742008-07-29 13:38:53 +090012
Linus Torvalds5b346532008-10-23 10:22:01 -070013/* 10 seconds */
14#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
15
FUJITA Tomonori8cbfd4f42008-07-09 16:29:41 +090016#ifdef CONFIG_GART_IOMMU
FUJITA Tomonorie93be882008-07-10 08:27:49 +090017extern int gart_iommu_aperture;
18extern int gart_iommu_aperture_allowed;
19extern int gart_iommu_aperture_disabled;
20
21extern void early_gart_iommu_check(void);
Yinghai Luf2cf8e02007-07-21 17:11:31 +020022extern void gart_iommu_init(void);
23extern void gart_iommu_shutdown(void);
24extern void __init gart_parse_options(char *);
FUJITA Tomonorie93be882008-07-10 08:27:49 +090025extern void gart_iommu_hole_init(void);
26
Yinghai Luf2cf8e02007-07-21 17:11:31 +020027#else
FUJITA Tomonorie93be882008-07-10 08:27:49 +090028#define gart_iommu_aperture 0
29#define gart_iommu_aperture_allowed 0
30#define gart_iommu_aperture_disabled 1
31
32static inline void early_gart_iommu_check(void)
33{
34}
FUJITA Tomonoriac7ded22008-07-11 10:23:43 +090035static inline void gart_iommu_init(void)
36{
37}
Yinghai Luf2cf8e02007-07-21 17:11:31 +020038static inline void gart_iommu_shutdown(void)
39{
40}
FUJITA Tomonoriac7ded22008-07-11 10:23:43 +090041static inline void gart_parse_options(char *options)
42{
43}
44static inline void gart_iommu_hole_init(void)
45{
46}
Yinghai Luf2cf8e02007-07-21 17:11:31 +020047#endif
48
H. Peter Anvin1965aae2008-10-22 22:26:29 -070049#endif /* _ASM_X86_IOMMU_H */