H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [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; |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 9 | |
Joerg Roedel | bdab0ba | 2008-10-15 22:02:07 -0700 | [diff] [blame] | 10 | extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); |
FUJITA Tomonori | 8978b74 | 2008-07-29 13:38:53 +0900 | [diff] [blame] | 11 | |
Linus Torvalds | 5b34653 | 2008-10-23 10:22:01 -0700 | [diff] [blame] | 12 | /* 10 seconds */ |
| 13 | #define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) |
| 14 | |
FUJITA Tomonori | 8cbfd4f4 | 2008-07-09 16:29:41 +0900 | [diff] [blame] | 15 | #ifdef CONFIG_GART_IOMMU |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 16 | extern int gart_iommu_aperture; |
| 17 | extern int gart_iommu_aperture_allowed; |
| 18 | extern int gart_iommu_aperture_disabled; |
| 19 | |
| 20 | extern void early_gart_iommu_check(void); |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 21 | extern void gart_iommu_init(void); |
| 22 | extern void gart_iommu_shutdown(void); |
| 23 | extern void __init gart_parse_options(char *); |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 24 | extern void gart_iommu_hole_init(void); |
| 25 | |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 26 | #else |
FUJITA Tomonori | e93be88 | 2008-07-10 08:27:49 +0900 | [diff] [blame] | 27 | #define gart_iommu_aperture 0 |
| 28 | #define gart_iommu_aperture_allowed 0 |
| 29 | #define gart_iommu_aperture_disabled 1 |
| 30 | |
| 31 | static inline void early_gart_iommu_check(void) |
| 32 | { |
| 33 | } |
FUJITA Tomonori | ac7ded2 | 2008-07-11 10:23:43 +0900 | [diff] [blame] | 34 | static inline void gart_iommu_init(void) |
| 35 | { |
| 36 | } |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 37 | static inline void gart_iommu_shutdown(void) |
| 38 | { |
| 39 | } |
FUJITA Tomonori | ac7ded2 | 2008-07-11 10:23:43 +0900 | [diff] [blame] | 40 | static inline void gart_parse_options(char *options) |
| 41 | { |
| 42 | } |
| 43 | static inline void gart_iommu_hole_init(void) |
| 44 | { |
| 45 | } |
Yinghai Lu | f2cf8e0 | 2007-07-21 17:11:31 +0200 | [diff] [blame] | 46 | #endif |
| 47 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 48 | #endif /* _ASM_X86_IOMMU_H */ |