Skip to content
/ linux Public

Commit 0569822

Browse files
johnpgarrySasha Levin
authored andcommitted
MIPS: Loongson: Make cpumask_of_node() robust against NUMA_NO_NODE
[ Upstream commit d55d3fe ] The arch definition of cpumask_of_node() cannot handle NUMA_NO_NODE - which is a valid index - so add a check for this. Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f86bee0 commit 0569822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/include/asm/mach-loongson64/topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
88

99
extern cpumask_t __node_cpumask[];
10-
#define cpumask_of_node(node) (&__node_cpumask[node])
10+
#define cpumask_of_node(node) ((node) == NUMA_NO_NODE ? cpu_all_mask : &__node_cpumask[node])
1111

1212
struct pci_bus;
1313
extern int pcibus_to_node(struct pci_bus *);

0 commit comments

Comments
 (0)