x86, swiotlb: Simplify SWIOTLB pci_swiotlb_detect routine.
In 'pci_swiotlb_detect' we used to do two different things: a). If user provided 'iommu=soft' or 'swiotlb=force' we would set swiotlb=1 and return 1 (and forcing pci-dma.c to call pci_swiotlb_init() immediately). b). If 4GB or more would be detected and if user did not specify iommu=off, we would set 'swiotlb=1' and return whatever 'a)' figured out. We simplify this by splitting a) and b) in two different routines. CC: Fujita Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by:Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> LKML-Reference: <1282845485-8991-5-git-send-email-konrad.wilk@oracle.com> Signed-off-by:
H. Peter Anvin <hpa@linux.intel.com>
Showing
- arch/x86/include/asm/iommu_table.h 2 additions, 2 deletionsarch/x86/include/asm/iommu_table.h
- arch/x86/include/asm/swiotlb.h 11 additions, 2 deletionsarch/x86/include/asm/swiotlb.h
- arch/x86/kernel/pci-dma.c 3 additions, 1 deletionarch/x86/kernel/pci-dma.c
- arch/x86/kernel/pci-swiotlb.c 27 additions, 6 deletionsarch/x86/kernel/pci-swiotlb.c
Loading
Please register or sign in to comment