[RFC PATCH v2 13/25] net/core: Use PISA for page_pool memory

From: Luigi Rizzo

Date: Mon Nov 09 2026 - 13:32:37 EST


When a page_pool performs DMA mapping (PP_FLAG_DMA_MAP) on a device with
pisa_rx_bufs enabled, pass __GFP_PISA_RW to use PISA memory.

Signed-off-by: Luigi Rizzo <lrizzo@xxxxxxxxxx>
---
net/core/page_pool.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index d7c88c0b67e53..91cae5ba78373 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -16,6 +16,7 @@
#include <net/page_pool/helpers.h>
#include <net/page_pool/memory_provider.h>
#include <net/xdp.h>
+#include <linux/pisa.h>

#include <linux/dma-direction.h>
#include <linux/dma-mapping.h>
@@ -622,6 +623,8 @@ static noinline netmem_ref __page_pool_alloc_netmems_slow(struct page_pool *pool
*/
if ((gfp & GFP_ATOMIC) == GFP_ATOMIC)
gfp |= __GFP_NOWARN;
+ if (dma_map)
+ gfp |= pisa_rx_gfp(pool->p.dev);

/* Don't support bulk alloc for high-order pages */
if (unlikely(pp_order))
--
2.56.0.542.g3ef89b7020-goog