lkml.org 
[lkml]   [2009]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] x86: set dma_ops to nommu_dma_ops by default
Date
we set dma_ops to nommu_dma_ops at two different places for x86_32 and
x86_64. This unifies them by setting dma_ops to nommu_dma_ops by
default.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
arch/x86/kernel/pci-dma.c | 4 +---
arch/x86/kernel/pci-swiotlb.c | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 20c3dc3..bf621b9 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -15,7 +15,7 @@

static int forbid_dac __read_mostly;

-struct dma_map_ops *dma_ops;
+struct dma_map_ops *dma_ops = &nommu_dma_ops;
EXPORT_SYMBOL(dma_ops);

static int iommu_sac_force __read_mostly;
@@ -126,8 +126,6 @@ void __init pci_iommu_alloc(void)
#ifdef CONFIG_X86_64
/* free the range so iommu could get some range less than 4G */
dma32_free_bootmem();
-#else
- dma_ops = &nommu_dma_ops;
#endif
if (pci_swiotlb_init())
return;
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index a6e5d0f..e36e71d 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -61,8 +61,7 @@ int __init pci_swiotlb_init(void)
if (swiotlb) {
swiotlb_init(0);
dma_ops = &swiotlb_dma_ops;
- } else
- dma_ops = &nommu_dma_ops;
+ }

return swiotlb_force;
}
--
1.5.6.5


\
 
 \ /
  Last update: 2009-11-14 12:51    [from the cache]
©2003-2011 Jasper Spaans