All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] MIPS: Move CPU topology macros to topology.h
@ 2014-08-08  3:16 Huacai Chen
  2014-08-08  3:16 ` [PATCH 2/2] MIPS: Loongson: Fix COP2 usage for preemptible kernel Huacai Chen
  2014-08-08 13:47 ` [PATCH 1/2] MIPS: Move CPU topology macros to topology.h Ralf Baechle
  0 siblings, 2 replies; 12+ messages in thread
From: Huacai Chen @ 2014-08-08  3:16 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: John Crispin, Steven J. Hill, Aurelien Jarno, linux-mips,
	Fuxin Zhang, Zhangjin Wu, Huacai Chen, Jayachandran C.

This fix macros redefinition problems for Netlogic.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: Jayachandran C. <jchandra@broadcom.com>
---
 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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-08-25 13:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08  3:16 [PATCH 1/2] MIPS: Move CPU topology macros to topology.h Huacai Chen
2014-08-08  3:16 ` [PATCH 2/2] MIPS: Loongson: Fix COP2 usage for preemptible kernel Huacai Chen
2014-08-08 12:12   ` Sergei Shtylyov
2014-08-08 13:47 ` [PATCH 1/2] MIPS: Move CPU topology macros to topology.h Ralf Baechle
2014-08-13  0:18   ` Jayachandran C.
2014-08-13  0:18     ` Jayachandran C.
2014-08-20  3:57     ` Huacai Chen
2014-08-22  4:18       ` [PATCH 1/2] MIPS: Netlogic: Use MIPS topology.h Jayachandran C
2014-08-22  4:18         ` Jayachandran C
2014-08-22  4:18         ` [PATCH 2/2] MIPS: Move topology macros to topology.h Jayachandran C
2014-08-22  4:18           ` Jayachandran C
2014-08-25 13:20         ` [PATCH 1/2] MIPS: Netlogic: Use MIPS topology.h Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.