mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
e7aa6c66b0
commit
98d4884ca5
8 changed files with 33 additions and 14 deletions
|
@ -146,7 +146,12 @@ static inline int hard_smp_processor_id(void)
|
|||
|
||||
static inline int nlm_nodeid(void)
|
||||
{
|
||||
return (__read_32bit_c0_register($15, 1) >> 5) & 0x3;
|
||||
uint32_t prid = read_c0_prid();
|
||||
|
||||
if ((prid & 0xff00) == PRID_IMP_NETLOGIC_XLP9XX)
|
||||
return (__read_32bit_c0_register($15, 1) >> 7) & 0x7;
|
||||
else
|
||||
return (__read_32bit_c0_register($15, 1) >> 5) & 0x3;
|
||||
}
|
||||
|
||||
static inline unsigned int nlm_core_id(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue