aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-netlogic/multi-node.h
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-12-21 06:22:14 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-01-24 16:39:47 -0500
commitce59d0f7fec6fa4e7a6c484308e25bad8a6caa39 (patch)
tree111c2a78eb3a952c9c0efe2895649fe6baec5ef1 /arch/mips/include/asm/mach-netlogic/multi-node.h
parentc24a8a7a99885d5b986f38f6631f69e7794a3e5e (diff)
MIPS: Netlogic: Add topology.h for XLP family
Add mach-netlogic/topology.h which contains XLP cpu number to core and node mapping. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6271/
Diffstat (limited to 'arch/mips/include/asm/mach-netlogic/multi-node.h')
-rw-r--r--arch/mips/include/asm/mach-netlogic/multi-node.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-netlogic/multi-node.h b/arch/mips/include/asm/mach-netlogic/multi-node.h
index d62fc773f4d7..b3d91e0c10dd 100644
--- a/arch/mips/include/asm/mach-netlogic/multi-node.h
+++ b/arch/mips/include/asm/mach-netlogic/multi-node.h
@@ -51,4 +51,23 @@
51#define NLM_THREADS_PER_CORE 4 51#define NLM_THREADS_PER_CORE 4
52#define NLM_CPUS_PER_NODE (NLM_CORES_PER_NODE * NLM_THREADS_PER_CORE) 52#define NLM_CPUS_PER_NODE (NLM_CORES_PER_NODE * NLM_THREADS_PER_CORE)
53 53
54struct nlm_soc_info {
55 unsigned long coremask; /* cores enabled on the soc */
56 unsigned long ebase; /* not used now */
57 uint64_t irqmask; /* EIMR for the node */
58 uint64_t sysbase; /* only for XLP - sys block base */
59 uint64_t picbase; /* PIC block base */
60 spinlock_t piclock; /* lock for PIC access */
61 cpumask_t cpumask; /* logical cpu mask for node */
62};
63
64extern struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
65#define nlm_get_node(i) (&nlm_nodes[i])
66#ifdef CONFIG_CPU_XLR
67#define nlm_current_node() (&nlm_nodes[0])
68#else
69#define nlm_current_node() (&nlm_nodes[nlm_nodeid()])
70#endif
71void nlm_node_init(int node);
72
54#endif 73#endif