MIPS: Netlogic: Add cpu to node mapping for XLP9XX
XLP9XX has 20 cores per node, opposed to 8 on earlier XLP8XX. Update code that calculates node id from cpu id to handle this. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6283/
This commit is contained in:

committed by
Ralf Baechle

parent
e7aa6c66b0
commit
98d4884ca5
@@ -47,9 +47,16 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#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)
|
||||
#ifdef CONFIG_CPU_XLR
|
||||
#define nlm_cores_per_node() 8
|
||||
#else
|
||||
extern unsigned int xlp_cores_per_node;
|
||||
#define nlm_cores_per_node() xlp_cores_per_node
|
||||
#endif
|
||||
|
||||
#define nlm_threads_per_node() (nlm_cores_per_node() * NLM_THREADS_PER_CORE)
|
||||
#define nlm_cpuid_to_node(c) ((c) / nlm_threads_per_node())
|
||||
|
||||
struct nlm_soc_info {
|
||||
unsigned long coremask; /* cores enabled on the soc */
|
||||
|
Reference in New Issue
Block a user