Skip to content

Commit be54f9d

Browse files
fujitaIngo Molnar
authored andcommitted
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>
1 parent b8b4832 commit be54f9d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arch/x86/kernel/pci-dma.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ void __init pci_iommu_alloc(void)
122122

123123
amd_iommu_detect();
124124

125-
#ifdef CONFIG_SWIOTLB
126125
pci_swiotlb_init();
127-
#endif
128126
}
129127
#endif
130128

include/asm-x86/swiotlb.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ extern int swiotlb_force;
4545

4646
#ifdef CONFIG_SWIOTLB
4747
extern int swiotlb;
48+
extern void pci_swiotlb_init(void);
4849
#else
4950
#define swiotlb 0
51+
static inline void pci_swiotlb_init(void)
52+
{
53+
}
5054
#endif
5155

52-
extern void pci_swiotlb_init(void);
53-
5456
static inline void dma_mark_clean(void *addr, size_t size) {}
5557

5658
#endif /* _ASM_SWIOTLB_H */

0 commit comments

Comments
 (0)