summaryrefslogtreecommitdiffstats
path: root/include/net/page_pool.h
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2021-10-13 11:19:20 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-15 11:54:20 +0200
commitd00e60ee54b12de945b8493cf18c1ada9e422514 (patch)
tree6e26909b5980bd7e3231977d4ad2637d2d4896f2 /include/net/page_pool.h
parentMerge branch 'octeontx2-af-miscellaneous-changes-for-cpt' (diff)
downloadlinux-d00e60ee54b12de945b8493cf18c1ada9e422514.tar.xz
linux-d00e60ee54b12de945b8493cf18c1ada9e422514.zip
page_pool: disable dma mapping support for 32-bit arch with 64-bit DMA
As the 32-bit arch with 64-bit DMA seems to rare those days, and page pool might carry a lot of code and complexity for systems that possibly. So disable dma mapping support for such systems, if drivers really want to work on such systems, they have to implement their own DMA-mapping fallback tracking outside page_pool. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/page_pool.h')
-rw-r--r--include/net/page_pool.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/include/net/page_pool.h b/include/net/page_pool.h
index a4082406a003..3855f069627f 100644
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
@@ -216,24 +216,14 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
page_pool_put_full_page(pool, page, true);
}
-#define PAGE_POOL_DMA_USE_PP_FRAG_COUNT \
- (sizeof(dma_addr_t) > sizeof(unsigned long))
-
static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
{
- dma_addr_t ret = page->dma_addr;
-
- if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT)
- ret |= (dma_addr_t)page->dma_addr_upper << 16 << 16;
-
- return ret;
+ return page->dma_addr;
}
static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t addr)
{
page->dma_addr = addr;
- if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT)
- page->dma_addr_upper = upper_32_bits(addr);
}
static inline void page_pool_set_frag_count(struct page *page, long nr)