Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

John Garry and committed by
Thomas Bogendoerfer
d55d3fe2 63804fed

+1 -1
+1 -1
arch/mips/include/asm/mach-loongson64/topology.h
··· 7 7 #define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2) 8 8 9 9 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]) 11 11 12 12 struct pci_bus; 13 13 extern int pcibus_to_node(struct pci_bus *);