dma-mapping: refactor dma_{alloc,free}_pages
authorChristoph Hellwig <hch@lst.de>
Mon, 1 Feb 2021 17:12:02 +0000 (18:12 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 15 Mar 2021 09:02:31 +0000 (10:02 +0100)
commit198c50e2ccff5c78ddbe0cb01593ac32458deb69
treecbe4886bfcfbe073e71912db1ea40dd82beea76c
parenteedb0b12d091a21909b5e84d9f3e5e649305bd12
dma-mapping: refactor dma_{alloc,free}_pages

Factour out internal versions without the dma_debug calls in preparation
for callers that will need different dma_debug calls.

Note that this changes the dma_debug calls to get the not page aligned
size values, but as long as alloc and free agree on one variant we are
fine.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Ricardo Ribalda <ribalda@chromium.org>
kernel/dma/mapping.c