swiotlb: make the swiotlb_init interface more useful
authorChristoph Hellwig <hch@lst.de>
Tue, 29 Mar 2022 15:27:33 +0000 (17:27 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 18 Apr 2022 05:21:11 +0000 (07:21 +0200)
commitc6af2aa9ffc9763826607bc2664ef3ea4475ed18
treea317bf9fea869ed4555759c155f0a95dc9a2cd95
parenta3e230926708125205ffd06d3dc2175a8263ae7e
swiotlb: make the swiotlb_init interface more useful

Pass a boolean flag to indicate if swiotlb needs to be enabled based on
the addressing needs, and replace the verbose argument with a set of
flags, including one to force enable bounce buffering.

Note that this patch removes the possibility to force xen-swiotlb use
with the swiotlb=force parameter on the command line on x86 (arm and
arm64 never supported that), but this interface will be restored shortly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
15 files changed:
arch/arm/mm/init.c
arch/arm64/mm/init.c
arch/ia64/mm/init.c
arch/mips/cavium-octeon/dma-octeon.c
arch/mips/loongson64/dma.c
arch/mips/sibyte/common/dma.c
arch/powerpc/mm/mem.c
arch/powerpc/platforms/pseries/setup.c
arch/riscv/mm/init.c
arch/s390/mm/init.c
arch/x86/kernel/pci-dma.c
drivers/xen/swiotlb-xen.c
include/linux/swiotlb.h
include/trace/events/swiotlb.h
kernel/dma/swiotlb.c