From 5874743ea8479b780799927f25580ef134547f0f Mon Sep 17 00:00:00 2001 From: Jayachandran C Date: Tue, 29 Apr 2014 20:07:49 +0530 Subject: MIPS: Netlogic: Use PRID_IMP_MASK macro Use PRID_IMP_MASK macro instead of 0xff00 to extract the processor type. Signed-off-by: Jayachandran C Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6868/ Signed-off-by: Ralf Baechle --- arch/mips/include/asm/netlogic/mips-extns.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/mips/include/asm/netlogic/mips-extns.h') diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h index de9aada6f4c1..38af905bf07e 100644 --- a/arch/mips/include/asm/netlogic/mips-extns.h +++ b/arch/mips/include/asm/netlogic/mips-extns.h @@ -146,9 +146,9 @@ static inline int hard_smp_processor_id(void) static inline int nlm_nodeid(void) { - uint32_t prid = read_c0_prid(); + uint32_t prid = read_c0_prid() & PRID_IMP_MASK; - if ((prid & 0xff00) == PRID_IMP_NETLOGIC_XLP9XX) + if (prid == PRID_IMP_NETLOGIC_XLP9XX) return (__read_32bit_c0_register($15, 1) >> 7) & 0x7; else return (__read_32bit_c0_register($15, 1) >> 5) & 0x3; -- cgit