summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJohn Garry <john.g.garry@oracle.com>2026-02-10 19:31:12 +0800
committerSasha Levin <sashal@kernel.org>2026-03-04 07:21:55 -0500
commit92adfb707beec0fe956424373654a70aad35ea13 (patch)
tree131edb855b98dd412a751371783a11723bed7e41 /arch
parent4f5b7016e552a2cc30f8d7afdb55c20b7cf48d2a (diff)
LoongArch: Make cpumask_of_node() robust against NUMA_NO_NODE
[ Upstream commit 94b0c831eda778ae9e4f2164a8b3de485d8977bb ] The arch definition of cpumask_of_node() cannot handle NUMA_NO_NODE - which is a valid index - so add a check for this. Cc: stable@vger.kernel.org Signed-off-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/loongarch/include/asm/topology.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/topology.h b/arch/loongarch/include/asm/topology.h
index 50273c9187d0..23ff2718a025 100644
--- a/arch/loongarch/include/asm/topology.h
+++ b/arch/loongarch/include/asm/topology.h
@@ -12,7 +12,7 @@
extern cpumask_t cpus_on_node[];
-#define cpumask_of_node(node) (&cpus_on_node[node])
+#define cpumask_of_node(node) ((node) == NUMA_NO_NODE ? cpu_all_mask : &cpus_on_node[node])
struct pci_bus;
extern int pcibus_to_node(struct pci_bus *);