[MIPS] Enable support for the userlocal hardware register
Which will cut down the cost of RDHWR $29 which is used to obtain the TLS pointer and so far being emulated in software down to a single cycle operation. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
@@ -1341,7 +1341,14 @@ void __init per_cpu_trap_init(void)
|
||||
set_c0_status(ST0_MX);
|
||||
|
||||
#ifdef CONFIG_CPU_MIPSR2
|
||||
write_c0_hwrena (0x0000000f); /* Allow rdhwr to all registers */
|
||||
if (cpu_has_mips_r2) {
|
||||
unsigned int enable = 0x0000000f;
|
||||
|
||||
if (cpu_has_userlocal)
|
||||
enable |= (1 << 29);
|
||||
|
||||
write_c0_hwrena(enable);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MIPS_MT_SMTC
|
||||
|
||||
Reference in New Issue
Block a user