swiotlb: provide swiotlb_init variants that remap the buffer
authorChristoph Hellwig <hch@lst.de>
Mon, 14 Mar 2022 07:02:57 +0000 (08:02 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 18 Apr 2022 05:21:13 +0000 (07:21 +0200)
commit7374153d294eb51de5a81ac38ff1c4fef8927bec
treed16ca1fc86fa89880cd0e9482118b5faf58ad403
parent742519538e6b07250c8085bbff4bd358bc03bf16
swiotlb: provide swiotlb_init variants that remap the buffer

To shared more code between swiotlb and xen-swiotlb, offer a
swiotlb_init_remap interface and add a remap callback to
swiotlb_init_late that will allow Xen to remap the buffer without
duplicating much of the logic.

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>
arch/x86/pci/sta2x11-fixup.c
include/linux/swiotlb.h
kernel/dma/swiotlb.c