aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/netlogic
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-12-21 06:22:26 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-01-24 16:39:49 -0500
commit98d4884ca55883e8b16180bd969a8bccaa885c80 (patch)
treeca7424268b4ef49d1472895bf2bb50d57b38d4fe /arch/mips/include/asm/netlogic
parente7aa6c66b0acc34caba3af485f1a039bfa8aef07 (diff)
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/
Diffstat (limited to 'arch/mips/include/asm/netlogic')
-rw-r--r--arch/mips/include/asm/netlogic/mips-extns.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h
index f299d31d7c1a..de9aada6f4c1 100644
--- a/arch/mips/include/asm/netlogic/mips-extns.h
+++ b/arch/mips/include/asm/netlogic/mips-extns.h
@@ -146,7 +146,12 @@ static inline int hard_smp_processor_id(void)
146 146
147static inline int nlm_nodeid(void) 147static inline int nlm_nodeid(void)
148{ 148{
149 return (__read_32bit_c0_register($15, 1) >> 5) & 0x3; 149 uint32_t prid = read_c0_prid();
150
151 if ((prid & 0xff00) == PRID_IMP_NETLOGIC_XLP9XX)
152 return (__read_32bit_c0_register($15, 1) >> 7) & 0x7;
153 else
154 return (__read_32bit_c0_register($15, 1) >> 5) & 0x3;
150} 155}
151 156
152static inline unsigned int nlm_core_id(void) 157static inline unsigned int nlm_core_id(void)