]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: dynamically allocate io_tlb_default_mem
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Mar 2021 16:14:23 +0000 (17:14 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 19 Mar 2021 04:58:25 +0000 (04:58 +0000)
commit1c02365ee934a0ef5c5dbeb1c5e724c42160baa0
treeba8681e49c8ea749f5c2fe64af50a1aa3f457329
parent47768eb702f18ff0d2fff2363c43c23aa0a9134f
swiotlb: dynamically allocate io_tlb_default_mem

Instead of allocating ->list and ->orig_addr separately just do one
dynamic allocation for the actual io_tlb_mem structure.  This simplifies
a lot of the initialization code, and also allows to just check
io_tlb_default_mem to see if swiotlb is in use.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/swiotlb-xen.c
include/linux/swiotlb.h
kernel/dma/swiotlb.c