aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/netlogic
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2015-01-07 16:58:31 +0530
committerRalf Baechle <ralf@linux-mips.org>2015-04-01 17:21:51 +0200
commit7d1859dcf5bef2fb974c8b0617bee6b085767807 (patch)
treed4107f06f55e663b193f0dcfdb7dd551f5217310 /arch/mips/include/asm/netlogic
parentMIPS: Netlogic: Move cores per node out of multi-node.h (diff)
downloadlinux-dev-7d1859dcf5bef2fb974c8b0617bee6b085767807.tar.xz
linux-dev-7d1859dcf5bef2fb974c8b0617bee6b085767807.zip
MIPS: Netlogic: nlm_core_id for xlp9xx
XLP9XX has 5 bits that specify the core in the EBASE register. XLP5XX case added as well for completeness. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8890/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/netlogic')
-rw-r--r--arch/mips/include/asm/netlogic/mips-extns.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h
index 06f1f75bfa9b..788baf399e69 100644
--- a/arch/mips/include/asm/netlogic/mips-extns.h
+++ b/arch/mips/include/asm/netlogic/mips-extns.h
@@ -157,7 +157,13 @@ static inline int nlm_nodeid(void)
static inline unsigned int nlm_core_id(void)
{
- return (read_c0_ebase() & 0x1c) >> 2;
+ uint32_t prid = read_c0_prid() & PRID_IMP_MASK;
+
+ if ((prid == PRID_IMP_NETLOGIC_XLP9XX) ||
+ (prid == PRID_IMP_NETLOGIC_XLP5XX))
+ return (read_c0_ebase() & 0x7c) >> 2;
+ else
+ return (read_c0_ebase() & 0x1c) >> 2;
}
static inline unsigned int nlm_thread_id(void)