[RFC PATCH v7 04/13] irqchip/gic-v3-its: Resolve the default NUMA node explicitly
From: Aneesh Kumar K.V (Arm)
Date: Mon Sep 21 2026 - 10:50:52 EST
alloc_pages_node() resolves NUMA_NO_NODE to numa_mem_id() internally. In
preparation for switching ITS allocations to the CoCo shared memory
allocator, resolve the default node explicitly in its_alloc_pages().
The CoCo shared memory allocator interprets NUMA_NO_NODE as a request to
apply the current task's memory policy. Passing numa_mem_id() instead
preserves the existing nearest-memory-node placement across the
allocator switch. This patch does not change the current allocation
behavior.
Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@xxxxxxxxxx>
---
drivers/irqchip/irq-gic-v3-its.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index e9807af23537..ac5507acb1a0 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -32,6 +32,7 @@
#include <linux/set_memory.h>
#include <linux/slab.h>
#include <linux/syscore_ops.h>
+#include <linux/topology.h>
#include <linux/irqchip.h>
#include <linux/irqchip/arm-gic-v3.h>
@@ -236,7 +237,7 @@ static struct page *its_alloc_pages_node(int node, gfp_t gfp,
static struct page *its_alloc_pages(gfp_t gfp, unsigned int order)
{
- return its_alloc_pages_node(NUMA_NO_NODE, gfp, order);
+ return its_alloc_pages_node(numa_mem_id(), gfp, order);
}
static void its_free_pages(void *addr, unsigned int order)
--
2.43.0