diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-12-16 15:17:36 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-17 12:58:19 -0500 |
commit | cfb80c9eae8c7ed8f2ee81090062d15ead51cbe8 (patch) | |
tree | 8343c02e8599f0e038cc9c0b303854193fb38e37 /arch/x86/kernel/pci-dma.c | |
parent | 8ce7996009bab7b2d23e7af7ad831fed7eb6faa1 (diff) |
x86: unify pci iommu setup and allow swiotlb to compile for 32 bit
swiotlb on 32 bit will be used by Xen domain 0 support.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/pci-dma.c')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index e150ad4f0ccc..00e07447a5bd 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -105,11 +105,15 @@ static void __init dma32_free_bootmem(void) | |||
105 | dma32_bootmem_ptr = NULL; | 105 | dma32_bootmem_ptr = NULL; |
106 | dma32_bootmem_size = 0; | 106 | dma32_bootmem_size = 0; |
107 | } | 107 | } |
108 | #endif | ||
108 | 109 | ||
109 | void __init pci_iommu_alloc(void) | 110 | void __init pci_iommu_alloc(void) |
110 | { | 111 | { |
112 | #ifdef CONFIG_X86_64 | ||
111 | /* free the range so iommu could get some range less than 4G */ | 113 | /* free the range so iommu could get some range less than 4G */ |
112 | dma32_free_bootmem(); | 114 | dma32_free_bootmem(); |
115 | #endif | ||
116 | |||
113 | /* | 117 | /* |
114 | * The order of these functions is important for | 118 | * The order of these functions is important for |
115 | * fall-back/fail-over reasons | 119 | * fall-back/fail-over reasons |
@@ -125,8 +129,6 @@ void __init pci_iommu_alloc(void) | |||
125 | pci_swiotlb_init(); | 129 | pci_swiotlb_init(); |
126 | } | 130 | } |
127 | 131 | ||
128 | #endif | ||
129 | |||
130 | void *dma_generic_alloc_coherent(struct device *dev, size_t size, | 132 | void *dma_generic_alloc_coherent(struct device *dev, size_t size, |
131 | dma_addr_t *dma_addr, gfp_t flag) | 133 | dma_addr_t *dma_addr, gfp_t flag) |
132 | { | 134 | { |