OSDN Git Service

swiotlb: make io_tlb_default_mem local to swiotlb.c
authorPetr Tesarik <petr.tesarik.ext@huawei.com>
Tue, 1 Aug 2023 06:23:57 +0000 (08:23 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 1 Aug 2023 16:02:09 +0000 (18:02 +0200)
commit05ee774122bd4a2f298668d6d5fc9e7b685a5e31
tree7144d0ef02ca1d93c0355de1ad5fa8349dadd3db
parent0c6874a6ac0474b54c8d1ba33e243ec578ff815a
swiotlb: make io_tlb_default_mem local to swiotlb.c

SWIOTLB implementation details should not be exposed to the rest of the
kernel. This will allow to make changes to the implementation without
modifying non-swiotlb code.

To avoid breaking existing users, provide helper functions for the few
required fields.

As a bonus, using a helper function to initialize struct device allows to
get rid of an #ifdef in driver core.

Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/mips/pci/pci-octeon.c
drivers/base/core.c
drivers/xen/swiotlb-xen.c
include/linux/swiotlb.h
kernel/dma/swiotlb.c
mm/slab_common.c