Skip to content

Commit 94b0c83

Browse files
johnpgarrychenhuacai
authored andcommitted
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>
1 parent abca658 commit 94b0c83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/loongarch/include/asm/topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
extern cpumask_t cpus_on_node[];
1414

15-
#define cpumask_of_node(node) (&cpus_on_node[node])
15+
#define cpumask_of_node(node) ((node) == NUMA_NO_NODE ? cpu_all_mask : &cpus_on_node[node])
1616

1717
struct pci_bus;
1818
extern int pcibus_to_node(struct pci_bus *);

0 commit comments

Comments
 (0)