[PATCH v11 13/23] irqchip/gic-v3-its: Resolve the default NUMA node explicitly
Aneesh Kumar K.V (Arm)
aneesh.kumar at kernel.org
Wed Dec 2 01:54:36 PST 2026
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_node().
The CoCo shared memory allocator interprets NUMA_NO_NODE as a request to
apply the current task's memory policy. Resolving it to numa_mem_id() in
the common ITS allocation helper preserves the existing
nearest-memory-node placement for all callers
This patch does not change the current allocation behavior.
Cc: Marc Zyngier <maz at kernel.org>
Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar at kernel.org>
---
drivers/irqchip/irq-gic-v3-its.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index c952c069f937..ada5c30af41e 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>
@@ -218,6 +219,9 @@ static struct page *its_alloc_pages_node(int node, gfp_t gfp,
struct page *page;
int ret = 0;
+ if (node == NUMA_NO_NODE)
+ node = numa_mem_id();
+
page = alloc_pages_node(node, gfp | gfp_flags_quirk, order);
if (!page)
--
2.43.0
More information about the linux-arm-kernel
mailing list