Skip to content

Commit

Permalink
x86: remove ifdef CONFIG_SWIOTLB in pci-dma.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Jul 11, 2008
1 parent b8b4832 commit be54f9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions arch/x86/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ void __init pci_iommu_alloc(void)

amd_iommu_detect();

#ifdef CONFIG_SWIOTLB
pci_swiotlb_init();
#endif
}
#endif

Expand Down
6 changes: 4 additions & 2 deletions include/asm-x86/swiotlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit be54f9d

Please sign in to comment.