diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-11-27 12:39:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-28 07:06:27 -0500 |
commit | 1d9b16d1690fe5edb1c907fe4746681cf026cdf3 (patch) | |
tree | 938fa2da8587a029f66ad979c1d233dfdbe9ef70 /arch/x86 | |
parent | a1afd01c175324656d0e8f1c82ea94b474953c04 (diff) |
x86: move GART specific stuff from iommu.h to gart.h
Impact: cleanup
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/gart.h | 33 | ||||
-rw-r--r-- | arch/x86/include/asm/iommu.h | 33 | ||||
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/early-quirks.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 1 |
7 files changed, 38 insertions, 33 deletions
diff --git a/arch/x86/include/asm/gart.h b/arch/x86/include/asm/gart.h index 74252264433d..6cfdafa409d8 100644 --- a/arch/x86/include/asm/gart.h +++ b/arch/x86/include/asm/gart.h | |||
@@ -29,6 +29,39 @@ extern int fix_aperture; | |||
29 | #define AMD64_GARTCACHECTL 0x9c | 29 | #define AMD64_GARTCACHECTL 0x9c |
30 | #define AMD64_GARTEN (1<<0) | 30 | #define AMD64_GARTEN (1<<0) |
31 | 31 | ||
32 | #ifdef CONFIG_GART_IOMMU | ||
33 | extern int gart_iommu_aperture; | ||
34 | extern int gart_iommu_aperture_allowed; | ||
35 | extern int gart_iommu_aperture_disabled; | ||
36 | |||
37 | extern void early_gart_iommu_check(void); | ||
38 | extern void gart_iommu_init(void); | ||
39 | extern void gart_iommu_shutdown(void); | ||
40 | extern void __init gart_parse_options(char *); | ||
41 | extern void gart_iommu_hole_init(void); | ||
42 | |||
43 | #else | ||
44 | #define gart_iommu_aperture 0 | ||
45 | #define gart_iommu_aperture_allowed 0 | ||
46 | #define gart_iommu_aperture_disabled 1 | ||
47 | |||
48 | static inline void early_gart_iommu_check(void) | ||
49 | { | ||
50 | } | ||
51 | static inline void gart_iommu_init(void) | ||
52 | { | ||
53 | } | ||
54 | static inline void gart_iommu_shutdown(void) | ||
55 | { | ||
56 | } | ||
57 | static inline void gart_parse_options(char *options) | ||
58 | { | ||
59 | } | ||
60 | static inline void gart_iommu_hole_init(void) | ||
61 | { | ||
62 | } | ||
63 | #endif | ||
64 | |||
32 | extern int agp_amd64_init(void); | 65 | extern int agp_amd64_init(void); |
33 | 66 | ||
34 | static inline void enable_gart_translation(struct pci_dev *dev, u64 addr) | 67 | static inline void enable_gart_translation(struct pci_dev *dev, u64 addr) |
diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h index 0b500c5b6446..295b13193f4d 100644 --- a/arch/x86/include/asm/iommu.h +++ b/arch/x86/include/asm/iommu.h | |||
@@ -12,37 +12,4 @@ extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); | |||
12 | /* 10 seconds */ | 12 | /* 10 seconds */ |
13 | #define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) | 13 | #define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) |
14 | 14 | ||
15 | #ifdef CONFIG_GART_IOMMU | ||
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); | ||
21 | extern void gart_iommu_init(void); | ||
22 | extern void gart_iommu_shutdown(void); | ||
23 | extern void __init gart_parse_options(char *); | ||
24 | extern void gart_iommu_hole_init(void); | ||
25 | |||
26 | #else | ||
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 | } | ||
34 | static inline void gart_iommu_init(void) | ||
35 | { | ||
36 | } | ||
37 | static inline void gart_iommu_shutdown(void) | ||
38 | { | ||
39 | } | ||
40 | static inline void gart_parse_options(char *options) | ||
41 | { | ||
42 | } | ||
43 | static inline void gart_iommu_hole_init(void) | ||
44 | { | ||
45 | } | ||
46 | #endif | ||
47 | |||
48 | #endif /* _ASM_X86_IOMMU_H */ | 15 | #endif /* _ASM_X86_IOMMU_H */ |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 331b318304eb..172e0dc4641e 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/iommu-helper.h> | 24 | #include <linux/iommu-helper.h> |
25 | #include <asm/proto.h> | 25 | #include <asm/proto.h> |
26 | #include <asm/iommu.h> | 26 | #include <asm/iommu.h> |
27 | #include <asm/gart.h> | ||
27 | #include <asm/amd_iommu_types.h> | 28 | #include <asm/amd_iommu_types.h> |
28 | #include <asm/amd_iommu.h> | 29 | #include <asm/amd_iommu.h> |
29 | 30 | ||
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 0cdcda35a05f..7685f0774a8f 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/amd_iommu_types.h> | 28 | #include <asm/amd_iommu_types.h> |
29 | #include <asm/amd_iommu.h> | 29 | #include <asm/amd_iommu.h> |
30 | #include <asm/iommu.h> | 30 | #include <asm/iommu.h> |
31 | #include <asm/gart.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * definitions for the ACPI scanning code | 34 | * definitions for the ACPI scanning code |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 1b894b72c0f5..744aa7fc49d5 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/io_apic.h> | 17 | #include <asm/io_apic.h> |
18 | #include <asm/apic.h> | 18 | #include <asm/apic.h> |
19 | #include <asm/iommu.h> | 19 | #include <asm/iommu.h> |
20 | #include <asm/gart.h> | ||
20 | 21 | ||
21 | static void __init fix_hypertransport_config(int num, int slot, int func) | 22 | static void __init fix_hypertransport_config(int num, int slot, int func) |
22 | { | 23 | { |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 192624820217..12eeb4bfcdeb 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <asm/proto.h> | 6 | #include <asm/proto.h> |
7 | #include <asm/dma.h> | 7 | #include <asm/dma.h> |
8 | #include <asm/iommu.h> | 8 | #include <asm/iommu.h> |
9 | #include <asm/gart.h> | ||
9 | #include <asm/calgary.h> | 10 | #include <asm/calgary.h> |
10 | #include <asm/amd_iommu.h> | 11 | #include <asm/amd_iommu.h> |
11 | 12 | ||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 0fa6790c1dd3..67d5979e654e 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -93,6 +93,7 @@ | |||
93 | #include <asm/desc.h> | 93 | #include <asm/desc.h> |
94 | #include <asm/dma.h> | 94 | #include <asm/dma.h> |
95 | #include <asm/iommu.h> | 95 | #include <asm/iommu.h> |
96 | #include <asm/gart.h> | ||
96 | #include <asm/mmu_context.h> | 97 | #include <asm/mmu_context.h> |
97 | #include <asm/proto.h> | 98 | #include <asm/proto.h> |
98 | 99 | ||