driver core: add a min_align_mask field to struct device_dma_parameters
authorJianxiong Gao <jxgao@google.com>
Mon, 1 Feb 2021 18:30:15 +0000 (10:30 -0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sat, 20 Feb 2021 15:13:26 +0000 (10:13 -0500)
commit36950f2da1ea4cb683be174f6f581e25b2d33e71
treea943c6554cd4ca9eaa3a8f82045d14552d96c5ce
parent66e8d3b8995c05cb1e17b120f52e0218bc534a49
driver core: add a min_align_mask field to struct device_dma_parameters

Some devices rely on the address offset in a page to function
correctly (NVMe driver as an example). These devices may use
a different page size than the Linux kernel. The address offset
has to be preserved upon mapping, and in order to do so, we
need to record the page_offset_mask first.

Signed-off-by: Jianxiong Gao <jxgao@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
include/linux/device.h
include/linux/dma-mapping.h