Skip to content

Commit d55d3fe

Browse files
johnpgarrytsbogend
authored andcommitted
MIPS: Loongson: 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. 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>
1 parent 63804fe commit d55d3fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)