Skip to content

Commit dc57870

Browse files
chenhuacairalfbaechle
authored andcommitted
MIPS: Move CPU topology macros to topology.h
The correct position is topology.h, and this fix macros redefinition problems for Netlogic. [ralf@linux-mips.org: Fix build - the original patch broke most configurations.] Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Jayachandran C. <jchandra@broadcom.com> Cc: John Crispin <john@phrozen.org> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/7575/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 4294452 commit dc57870

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎arch/mips/include/asm/smp.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ extern int __cpu_logical_map[NR_CPUS];
3737

3838
#define NO_PROC_ID (-1)
3939

40-
#define topology_physical_package_id(cpu) (cpu_data[cpu].package)
41-
#define topology_core_id(cpu) (cpu_data[cpu].core)
42-
#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
43-
#define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu])
44-
4540
#define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */
4641
#define SMP_CALL_FUNCTION 0x2
4742
/* Octeon - Tell another core to flush its icache */

‎arch/mips/include/asm/topology.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,13 @@
99
#define __ASM_TOPOLOGY_H
1010

1111
#include <topology.h>
12+
#include <linux/smp.h>
13+
14+
#ifdef CONFIG_SMP
15+
#define topology_physical_package_id(cpu) (cpu_data[cpu].package)
16+
#define topology_core_id(cpu) (cpu_data[cpu].core)
17+
#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
18+
#define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu])
19+
#endif
1220

1321
#endif /* __ASM_TOPOLOGY_H */

0 commit comments

Comments
 (0)