瀏覽代碼

x86: remove ifdef CONFIG_SWIOTLB in pci-dma.c

As other IOMMUs do, this puts dummy pci_swiotlb_init() in swiotlb.h
and remove ifdef CONFIG_SWIOTLB in pci-dma.c.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
FUJITA Tomonori 17 年之前
父節點
當前提交
be54f9d1c8
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 0 2
      arch/x86/kernel/pci-dma.c
  2. 4 2
      include/asm-x86/swiotlb.h

+ 0 - 2
arch/x86/kernel/pci-dma.c

@@ -122,9 +122,7 @@ void __init pci_iommu_alloc(void)
 
 	amd_iommu_detect();
 
-#ifdef CONFIG_SWIOTLB
 	pci_swiotlb_init();
-#endif
 }
 #endif
 

+ 4 - 2
include/asm-x86/swiotlb.h

@@ -45,12 +45,14 @@ extern int swiotlb_force;
 
 #ifdef CONFIG_SWIOTLB
 extern int swiotlb;
+extern void pci_swiotlb_init(void);
 #else
 #define swiotlb 0
+static inline void pci_swiotlb_init(void)
+{
+}
 #endif
 
-extern void pci_swiotlb_init(void);
-
 static inline void dma_mark_clean(void *addr, size_t size) {}
 
 #endif /* _ASM_SWIOTLB_H */