diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-04-08 12:20:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:57 -0400 |
commit | 8e0c379718ef32967deea55937895bfc9b493dd8 (patch) | |
tree | 4176210a3359f4d7421a8b7e0cec29e848e8d68a /arch/x86/kernel/pci-dma_32.c | |
parent | bca5c09663030bdd18ab1b3ccb6671f663c3345a (diff) |
x86: merge dma_supported
The code for both arches are very similar, so this patch merge them.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/pci-dma_32.c')
-rw-r--r-- | arch/x86/kernel/pci-dma_32.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c index 6543bb30b65d..1d4091af4417 100644 --- a/arch/x86/kernel/pci-dma_32.c +++ b/arch/x86/kernel/pci-dma_32.c | |||
@@ -155,30 +155,6 @@ void *dma_mark_declared_memory_occupied(struct device *dev, | |||
155 | EXPORT_SYMBOL(dma_mark_declared_memory_occupied); | 155 | EXPORT_SYMBOL(dma_mark_declared_memory_occupied); |
156 | 156 | ||
157 | #ifdef CONFIG_PCI | 157 | #ifdef CONFIG_PCI |
158 | /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ | ||
159 | |||
160 | int | ||
161 | dma_supported(struct device *dev, u64 mask) | ||
162 | { | ||
163 | /* | ||
164 | * we fall back to GFP_DMA when the mask isn't all 1s, | ||
165 | * so we can't guarantee allocations that must be | ||
166 | * within a tighter range than GFP_DMA.. | ||
167 | */ | ||
168 | if (mask < 0x00ffffff) | ||
169 | return 0; | ||
170 | |||
171 | /* Work around chipset bugs */ | ||
172 | if (forbid_dac > 0 && mask > 0xffffffffULL) | ||
173 | return 0; | ||
174 | |||
175 | if (dma_ops->dma_supported) | ||
176 | return dma_ops->dma_supported(dev, mask); | ||
177 | |||
178 | return 1; | ||
179 | } | ||
180 | EXPORT_SYMBOL(dma_supported); | ||
181 | |||
182 | static int check_iommu(char *s) | 158 | static int check_iommu(char *s) |
183 | { | 159 | { |
184 | if (!strcmp(s, "usedac")) { | 160 | if (!strcmp(s, "usedac")) { |