[PATCH 1/2] MIPS: Move CPU topology macros to topology.h

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

 



This fix macros redefinition problems for Netlogic.

Signed-off-by: Huacai Chen <chenhc@xxxxxxxxxx>
Cc: Jayachandran C. <jchandra@xxxxxxxxxxxx>
---
 arch/mips/include/asm/smp.h      |    5 -----
 arch/mips/include/asm/topology.h |   13 +++++++++++++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index 1e0f20a..eacf865 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -37,11 +37,6 @@ extern int __cpu_logical_map[NR_CPUS];
 
 #define NO_PROC_ID	(-1)
 
-#define topology_physical_package_id(cpu)	(cpu_data[cpu].package)
-#define topology_core_id(cpu)			(cpu_data[cpu].core)
-#define topology_core_cpumask(cpu)		(&cpu_core_map[cpu])
-#define topology_thread_cpumask(cpu)		(&cpu_sibling_map[cpu])
-
 #define SMP_RESCHEDULE_YOURSELF 0x1	/* XXX braindead */
 #define SMP_CALL_FUNCTION	0x2
 /* Octeon - Tell another core to flush its icache */
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h
index 20ea485..2a0f04b 100644
--- a/arch/mips/include/asm/topology.h
+++ b/arch/mips/include/asm/topology.h
@@ -10,4 +10,17 @@
 
 #include <topology.h>
 
+#ifndef topology_physical_package_id
+#define topology_physical_package_id(cpu)	(cpu_data[cpu].package)
+#endif
+#ifndef topology_core_id
+#define topology_core_id(cpu)			(cpu_data[cpu].core)
+#endif
+#ifndef topology_core_cpumask
+#define topology_core_cpumask(cpu)		(&cpu_core_map[cpu])
+#endif
+#ifndef topology_thread_cpumask
+#define topology_thread_cpumask(cpu)		(&cpu_sibling_map[cpu])
+#endif
+
 #endif /* __ASM_TOPOLOGY_H */
-- 
1.7.7.3



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

  Powered by Linux