blob: 2daaffcda52f86df2c04d6359674dfb8511723fc [file] [log] [blame]
Vegard Nossum77ef50a2008-06-18 17:08:48 +02001#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;
Fenghua Yu5b6985c2008-10-16 18:02:32 -070010extern int forbid_dac;
FUJITA Tomonorie93be882008-07-10 08:27:49 +090011
Joerg Roedelbdab0ba2008-10-15 22:02:07 -070012extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
FUJITA Tomonori8978b742008-07-29 13:38:53 +090013
Fenghua Yu5b6985c2008-10-16 18:02:32 -070014/* 10 seconds */
15#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
16
FUJITA Tomonori8cbfd4f42008-07-09 16:29:41 +090017#ifdef CONFIG_GART_IOMMU
FUJITA Tomonorie93be882008-07-10 08:27:49 +090018extern int gart_iommu_aperture;
19extern int gart_iommu_aperture_allowed;
20extern int gart_iommu_aperture_disabled;
21
22extern void early_gart_iommu_check(void);
Yinghai Luf2cf8e02007-07-21 17:11:31 +020023extern void gart_iommu_init(void);
24extern void gart_iommu_shutdown(void);
25extern void __init gart_parse_options(char *);
FUJITA Tomonorie93be882008-07-10 08:27:49 +090026extern void gart_iommu_hole_init(void);
27
Yinghai Luf2cf8e02007-07-21 17:11:31 +020028#else
FUJITA Tomonorie93be882008-07-10 08:27:49 +090029#define gart_iommu_aperture 0
30#define gart_iommu_aperture_allowed 0
31#define gart_iommu_aperture_disabled 1
32
33static inline void early_gart_iommu_check(void)
34{
35}
FUJITA Tomonoriac7ded22008-07-11 10:23:43 +090036static inline void gart_iommu_init(void)
37{
38}
Yinghai Luf2cf8e02007-07-21 17:11:31 +020039static inline void gart_iommu_shutdown(void)
40{
41}
FUJITA Tomonoriac7ded22008-07-11 10:23:43 +090042static inline void gart_parse_options(char *options)
43{
44}
45static inline void gart_iommu_hole_init(void)
46{
47}
Yinghai Luf2cf8e02007-07-21 17:11:31 +020048#endif
49
Vegard Nossum77ef50a2008-06-18 17:08:48 +020050#endif /* ASM_X86__IOMMU_H */