diff options
| author | Samiullah Khawaja <[email protected]> | 2024-12-11 21:20:30 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-12-13 02:49:07 +0000 |
| commit | b400f4b87430c105d92550cee5a72aea01fdf3d6 (patch) | |
| tree | d00d81f3d59142758985f901fc2f4b5de52eb693 /net/core/page_pool.c | |
| parent | net: page_pool: create page_pool_alloc_netmem (diff) | |
| download | kernel-b400f4b87430c105d92550cee5a72aea01fdf3d6.tar.gz kernel-b400f4b87430c105d92550cee5a72aea01fdf3d6.zip | |
page_pool: Set `dma_sync` to false for devmem memory provider
Move the `dma_map` and `dma_sync` checks to `page_pool_init` to make
them generic. Set dma_sync to false for devmem memory provider because
the dma_sync APIs should not be used for dma_buf backed devmem memory
provider.
Cc: Jason Gunthorpe <[email protected]>
Signed-off-by: Samiullah Khawaja <[email protected]>
Signed-off-by: Mina Almasry <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/page_pool.c')
| -rw-r--r-- | net/core/page_pool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 7a17af286a9e..275a7fd209d7 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -287,6 +287,9 @@ static int page_pool_init(struct page_pool *pool, } if (pool->mp_priv) { + if (!pool->dma_map || !pool->dma_sync) + return -EOPNOTSUPP; + err = mp_dmabuf_devmem_init(pool); if (err) { pr_warn("%s() mem-provider init failed %d\n", __func__, |
