Skip to contentSkip to conversation

MIPS: Move CPU topology macros to topology.h

PATCH New Huacai Chen 1 participant 1 message Aug 26, 2014 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 MIPS: Move CPU topology macros to topology.h

The correct position is topology.h, and this fix macros redefinition problems for Netlogic.

V2: remove unnecessary #ifndefs.

Cc Jayachandran C. <[email protected]>
---
 arch/mips/include/asm/smp.h      |    5 -----
 arch/mips/include/asm/topology.h |    5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/mips/include/asm/smp.h +0 -5
index 1e0f20a..eacf865 100644
@@ -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 */
arch/mips/include/asm/topology.h +5 -0
index 20ea485..e012429 100644
@@ -10,4 +10,9 @@
 
 #include <topology.h>
 
+#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])
+
 #endif /* __ASM_TOPOLOGY_H */
Signature · 1 line
1.7.7.3