diff options
author | Huacai Chen <chenhc@lemote.com> | 2014-08-26 10:41:31 +0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-08-27 15:44:44 +0400 |
commit | dc578706c43fafb628ea2f23d44e8adb247fc60d (patch) | |
tree | 8b92b6af184913edaccd8a98cb1bc30afc3108c0 /arch/mips/include/asm/topology.h | |
parent | 42944521af97a3b25516f15f3149aec3779656dc (diff) | |
download | linux-dc578706c43fafb628ea2f23d44e8adb247fc60d.tar.xz |
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>
Diffstat (limited to 'arch/mips/include/asm/topology.h')
-rw-r--r-- | arch/mips/include/asm/topology.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h index 20ea4859c822..3e307ec2afba 100644 --- a/arch/mips/include/asm/topology.h +++ b/arch/mips/include/asm/topology.h @@ -9,5 +9,13 @@ #define __ASM_TOPOLOGY_H #include <topology.h> +#include <linux/smp.h> + +#ifdef CONFIG_SMP +#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 #endif /* __ASM_TOPOLOGY_H */ |