Vegard Nossum | 77ef50a | 2008-06-18 17:08:48 +0200 | [diff] [blame] | 1 | #ifndef ASM_X86__IOMMU_H |
| 2 | #define ASM_X86__IOMMU_H |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 3 | |
| 4 | extern void pci_iommu_shutdown(void); |
| 5 | extern void no_iommu_init(void); |
Alexis Bruemmer | 1956a96 | 2008-07-25 19:44:51 -0700 | [diff] [blame] | 6 | extern struct dma_mapping_ops nommu_dma_ops; |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 7 | extern int force_iommu, no_iommu; |
| 8 | extern int iommu_detected; |
David Woodhouse | e51af66 | 2008-09-04 09:54:37 +0100 | [diff] [blame] | 9 | extern int dmar_disabled; |
Fenghua Yu | 5b6985c | 2008-10-16 18:02:32 -0700 | [diff] [blame^] | 10 | extern int forbid_dac; |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 11 | |
Joerg Roedel | bdab0ba | 2008-10-15 22:02:07 -0700 | [diff] [blame] | 12 | extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); |
FUJITA Tomonori | 8978b74 | 2008-07-29 13:38:53 +0900 | [diff] [blame] | 13 | |
Fenghua Yu | 5b6985c | 2008-10-16 18:02:32 -0700 | [diff] [blame^] | 14 | /* 10 seconds */ |
| 15 | #define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) |
| 16 | |
FUJITA Tomonori | 8cbfd4f4 | 2008-07-09 16:29:41 +0900 | [diff] [blame] | 17 | #ifdef CONFIG_GART_IOMMU |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 18 | extern int gart_iommu_aperture; |
| 19 | extern int gart_iommu_aperture_allowed; |
| 20 | extern int gart_iommu_aperture_disabled; |
| 21 | |
| 22 | extern void early_gart_iommu_check(void); |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 23 | extern void gart_iommu_init(void); |
| 24 | extern void gart_iommu_shutdown(void); |
| 25 | extern void __init gart_parse_options(char *); |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 26 | extern void gart_iommu_hole_init(void); |
| 27 | |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 28 | #else |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 29 | #define gart_iommu_aperture 0 |
| 30 | #define gart_iommu_aperture_allowed 0 |
| 31 | #define gart_iommu_aperture_disabled 1 |
| 32 | |
| 33 | static inline void early_gart_iommu_check(void) |
| 34 | { |
| 35 | } |
FUJITA Tomonori | ac7ded2 | 2008-07-11 10:23:43 +0900 | [diff] [blame] | 36 | static inline void gart_iommu_init(void) |
| 37 | { |
| 38 | } |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 39 | static inline void gart_iommu_shutdown(void) |
| 40 | { |
| 41 | } |
FUJITA Tomonori | ac7ded2 | 2008-07-11 10:23:43 +0900 | [diff] [blame] | 42 | static inline void gart_parse_options(char *options) |
| 43 | { |
| 44 | } |
| 45 | static inline void gart_iommu_hole_init(void) |
| 46 | { |
| 47 | } |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 48 | #endif |
| 49 | |
Vegard Nossum | 77ef50a | 2008-06-18 17:08:48 +0200 | [diff] [blame] | 50 | #endif /* ASM_X86__IOMMU_H */ |