diff options
author | Jon Mason <jdmason@us.ibm.com> | 2006-06-26 07:58:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:18 -0400 |
commit | 0dc243ae10c8309c170a3af9f1adad1924a9f217 (patch) | |
tree | f550a8097913728ce96322d5f799329489db85a1 /include | |
parent | a3c042a0f022dade8e02bf6c9be5d2379d7e133c (diff) |
[PATCH] x86_64: Calgary IOMMU - IOMMU abstractions
This patch creates a new interface for IOMMUs by adding a centralized
location for IOMMU allocation (for translation tables/apertures) and
IOMMU initialization. In creating these, code was moved around for
abstraction, uniformity, and consiceness.
Take note of the move of the iommu_setup bootarg parsing code to
__setup. This is enabled by moving back the location of the aperture
allocation/detection to mem init (which while ugly, was already the
location of the swiotlb_init).
While a slight departure from the previous patch, I belive this provides
the true intention of the previous versions of the patch which changed
this code. It also makes the addition of the upcoming calgary code much
cleaner than previous patches.
[AK: Removed one broken change. iommu_setup still has to be called
early]
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86_64/pci.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/proto.h | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index 3374d34c4acd..4dbc07c54f7a 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
@@ -39,8 +39,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); | |||
39 | #include <asm/scatterlist.h> | 39 | #include <asm/scatterlist.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <asm/page.h> | 41 | #include <asm/page.h> |
42 | #include <linux/dma-mapping.h> /* for have_iommu */ | ||
43 | 42 | ||
43 | extern void pci_iommu_alloc(void); | ||
44 | extern int iommu_setup(char *opt); | 44 | extern int iommu_setup(char *opt); |
45 | 45 | ||
46 | /* The PCI address space does equal the physical memory | 46 | /* The PCI address space does equal the physical memory |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index 9d3335b4e9b6..038fe1f47e6f 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -37,7 +37,6 @@ extern void ia32_sysenter_target(void); | |||
37 | 37 | ||
38 | extern void config_acpi_tables(void); | 38 | extern void config_acpi_tables(void); |
39 | extern void ia32_syscall(void); | 39 | extern void ia32_syscall(void); |
40 | extern void iommu_hole_init(void); | ||
41 | 40 | ||
42 | extern int pmtimer_mark_offset(void); | 41 | extern int pmtimer_mark_offset(void); |
43 | extern void pmtimer_resume(void); | 42 | extern void pmtimer_resume(void); |
@@ -101,13 +100,9 @@ extern int unsynchronized_tsc(void); | |||
101 | 100 | ||
102 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 101 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
103 | 102 | ||
104 | extern void gart_parse_options(char *); | ||
105 | extern void __init no_iommu_init(void); | ||
106 | |||
107 | extern unsigned long table_start, table_end; | 103 | extern unsigned long table_start, table_end; |
108 | 104 | ||
109 | extern int exception_trace; | 105 | extern int exception_trace; |
110 | extern int force_iommu, no_iommu; | ||
111 | extern int using_apic_timer; | 106 | extern int using_apic_timer; |
112 | extern int disable_apic; | 107 | extern int disable_apic; |
113 | extern unsigned cpu_khz; | 108 | extern unsigned cpu_khz; |
@@ -116,8 +111,13 @@ extern int skip_ioapic_setup; | |||
116 | extern int acpi_ht; | 111 | extern int acpi_ht; |
117 | extern int acpi_disabled; | 112 | extern int acpi_disabled; |
118 | 113 | ||
114 | extern void no_iommu_init(void); | ||
115 | extern int force_iommu, no_iommu; | ||
119 | extern int iommu_detected; | 116 | extern int iommu_detected; |
120 | #ifdef CONFIG_IOMMU | 117 | #ifdef CONFIG_IOMMU |
118 | extern void gart_iommu_init(void); | ||
119 | extern void gart_parse_options(char *); | ||
120 | extern void iommu_hole_init(void); | ||
121 | extern int fallback_aper_order; | 121 | extern int fallback_aper_order; |
122 | extern int fallback_aper_force; | 122 | extern int fallback_aper_force; |
123 | extern int iommu_aperture; | 123 | extern int iommu_aperture; |