[PATCH] MIPS: Loongson64: return cpu_all_mask when node is NUMA_NO_NODE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The @node passed to cpumask_of_node() can be NUMA_NO_NODE, in that
case we should just return cpu_all_mask.

Signed-off-by: Zhengyuan Liu <liuzhengyuan@xxxxxxxxxxxxx>
---
 arch/mips/include/asm/mach-loongson64/topology.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/mach-loongson64/topology.h
b/arch/mips/include/asm/mach-loongson64/topology.h
index 3414a1fd1783..57f0306fcf34 100644
--- a/arch/mips/include/asm/mach-loongson64/topology.h
+++ b/arch/mips/include/asm/mach-loongson64/topology.h
@@ -7,7 +7,9 @@
 #define cpu_to_node(cpu)       (cpu_logical_map(cpu) >> 2)

 extern cpumask_t __node_cpumask[];
-#define cpumask_of_node(node)  (&__node_cpumask[node])
+#define cpumask_of_node(node)  ((node) == -1 ?                         \
+                                cpu_all_mask :                         \
+                                &__node_cpumask[node])

 struct pci_bus;
 extern int pcibus_to_node(struct pci_bus *);
--
2.20.1



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux