diff options
author | Jayachandran C <jchandra@broadcom.com> | 2012-10-31 12:01:40 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-11-09 11:37:20 +0100 |
commit | bb1e4bc5cdc9dce7680317a4ebf87a12fc8c6a13 (patch) | |
tree | a02d2d4960ea76db3a2411b2383efde69cf83bef /arch/mips/include/asm/netlogic | |
parent | 77ae798f5b736dfdc692b86b393d9699052ac77a (diff) | |
download | op-kernel-dev-bb1e4bc5cdc9dce7680317a4ebf87a12fc8c6a13.zip op-kernel-dev-bb1e4bc5cdc9dce7680317a4ebf87a12fc8c6a13.tar.gz |
MIPS: Netlogic: Make number of nodes configurable
There can be 1, 2 or 4 SoCs(nodes) in a multi-chip XLP board. Add an
option for multi-chip boards in case of XLP, and make the number of
nodes configurable.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Patchwork: http://patchwork.linux-mips.org/patch/4470
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/include/asm/netlogic')
-rw-r--r-- | arch/mips/include/asm/netlogic/common.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/include/asm/netlogic/common.h b/arch/mips/include/asm/netlogic/common.h index 2eb39fa..3c6814e 100644 --- a/arch/mips/include/asm/netlogic/common.h +++ b/arch/mips/include/asm/netlogic/common.h @@ -48,6 +48,7 @@ #include <linux/cpumask.h> #include <linux/spinlock.h> #include <asm/irq.h> +#include <asm/mach-netlogic/multi-node.h> struct irq_desc; void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc); @@ -86,12 +87,12 @@ struct nlm_soc_info { spinlock_t piclock; }; -#define NLM_CORES_PER_NODE 8 -#define NLM_THREADS_PER_CORE 4 -#define NLM_CPUS_PER_NODE (NLM_CORES_PER_NODE * NLM_THREADS_PER_CORE) #define nlm_get_node(i) (&nlm_nodes[i]) -#define NLM_NR_NODES 1 +#ifdef CONFIG_CPU_XLR #define nlm_current_node() (&nlm_nodes[0]) +#else +#define nlm_current_node() (&nlm_nodes[nlm_nodeid()]) +#endif struct irq_data; uint64_t nlm_pci_irqmask(int node); |