summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Garry <john.g.garry@oracle.com>2026-02-10 14:31:12 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2026-02-10 14:31:12 +0300
commit94b0c831eda778ae9e4f2164a8b3de485d8977bb (patch)
treec735add0d9ef8853b0cf83d99c7de175c969d7a7
parentabca6583a2aa00ed856907d86446ae527442a754 (diff)
downloadlinux-94b0c831eda778ae9e4f2164a8b3de485d8977bb.tar.xz
LoongArch: Make cpumask_of_node() robust against NUMA_NO_NODE
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>
-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 f06e7ff25bb7..6b79d6183085 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 *);