aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-10-27 03:34:44 -0400
committerIngo Molnar <mingo@elte.hu>2009-11-08 07:12:26 -0500
commit338bac527ed0e35b4cb50390972f15d3cbce92ca (patch)
treec959878378523ba7f3bb0e30e98336549cadbdc0 /arch/x86/include/asm
parent7c9abfb884b8737f0afdc8a88bcea77526f0da87 (diff)
x86: Use x86_platform for iommu_shutdown
This patch cleans up pci_iommu_shutdown() a bit to use x86_platform (similar to how IA64 initializes an IOMMU driver). This adds iommu_shutdown() to x86_platform to avoid calling every IOMMUs' shutdown functions in pci_iommu_shutdown() in order. The IOMMU shutdown functions are platform specific (we don't have multiple different IOMMU hardware) so the current way is pointless. An IOMMU driver sets x86_platform.iommu_shutdown to the shutdown function if necessary. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: joerg.roedel@amd.com LKML-Reference: <20091027163358F.fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/amd_iommu.h2
-rw-r--r--arch/x86/include/asm/gart.h4
-rw-r--r--arch/x86/include/asm/iommu.h2
-rw-r--r--arch/x86/include/asm/x86_init.h1
4 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/include/asm/amd_iommu.h b/arch/x86/include/asm/amd_iommu.h
index 4b180897e6b5..3604669f7b15 100644
--- a/arch/x86/include/asm/amd_iommu.h
+++ b/arch/x86/include/asm/amd_iommu.h
@@ -30,12 +30,10 @@ extern void amd_iommu_detect(void);
30extern irqreturn_t amd_iommu_int_handler(int irq, void *data); 30extern irqreturn_t amd_iommu_int_handler(int irq, void *data);
31extern void amd_iommu_flush_all_domains(void); 31extern void amd_iommu_flush_all_domains(void);
32extern void amd_iommu_flush_all_devices(void); 32extern void amd_iommu_flush_all_devices(void);
33extern void amd_iommu_shutdown(void);
34extern void amd_iommu_apply_erratum_63(u16 devid); 33extern void amd_iommu_apply_erratum_63(u16 devid);
35#else 34#else
36static inline int amd_iommu_init(void) { return -ENODEV; } 35static inline int amd_iommu_init(void) { return -ENODEV; }
37static inline void amd_iommu_detect(void) { } 36static inline void amd_iommu_detect(void) { }
38static inline void amd_iommu_shutdown(void) { }
39#endif 37#endif
40 38
41#endif /* _ASM_X86_AMD_IOMMU_H */ 39#endif /* _ASM_X86_AMD_IOMMU_H */
diff --git a/arch/x86/include/asm/gart.h b/arch/x86/include/asm/gart.h
index 6cfdafa409d8..4fdd5b3f87b1 100644
--- a/arch/x86/include/asm/gart.h
+++ b/arch/x86/include/asm/gart.h
@@ -36,7 +36,6 @@ extern int gart_iommu_aperture_disabled;
36 36
37extern void early_gart_iommu_check(void); 37extern void early_gart_iommu_check(void);
38extern void gart_iommu_init(void); 38extern void gart_iommu_init(void);
39extern void gart_iommu_shutdown(void);
40extern void __init gart_parse_options(char *); 39extern void __init gart_parse_options(char *);
41extern void gart_iommu_hole_init(void); 40extern void gart_iommu_hole_init(void);
42 41
@@ -51,9 +50,6 @@ static inline void early_gart_iommu_check(void)
51static inline void gart_iommu_init(void) 50static inline void gart_iommu_init(void)
52{ 51{
53} 52}
54static inline void gart_iommu_shutdown(void)
55{
56}
57static inline void gart_parse_options(char *options) 53static inline void gart_parse_options(char *options)
58{ 54{
59} 55}
diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h
index fd6d21bbee6c..878b30715766 100644
--- a/arch/x86/include/asm/iommu.h
+++ b/arch/x86/include/asm/iommu.h
@@ -1,7 +1,7 @@
1#ifndef _ASM_X86_IOMMU_H 1#ifndef _ASM_X86_IOMMU_H
2#define _ASM_X86_IOMMU_H 2#define _ASM_X86_IOMMU_H
3 3
4extern void pci_iommu_shutdown(void); 4static inline void iommu_shutdown_noop(void) {}
5extern void no_iommu_init(void); 5extern void no_iommu_init(void);
6extern struct dma_map_ops nommu_dma_ops; 6extern struct dma_map_ops nommu_dma_ops;
7extern int force_iommu, no_iommu; 7extern int force_iommu, no_iommu;
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index 2c756fd4ab0e..66008ed80b7a 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -121,6 +121,7 @@ struct x86_platform_ops {
121 unsigned long (*calibrate_tsc)(void); 121 unsigned long (*calibrate_tsc)(void);
122 unsigned long (*get_wallclock)(void); 122 unsigned long (*get_wallclock)(void);
123 int (*set_wallclock)(unsigned long nowtime); 123 int (*set_wallclock)(unsigned long nowtime);
124 void (*iommu_shutdown)(void);
124}; 125};
125 126
126extern struct x86_init_ops x86_init; 127extern struct x86_init_ops x86_init;