diff options
Diffstat (limited to 'arch/mips/include/asm/mipsmtregs.h')
| -rw-r--r-- | arch/mips/include/asm/mipsmtregs.h | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mipsmtregs.h b/arch/mips/include/asm/mipsmtregs.h index 38b7704ee37..5f8052ce43b 100644 --- a/arch/mips/include/asm/mipsmtregs.h +++ b/arch/mips/include/asm/mipsmtregs.h @@ -36,6 +36,8 @@  #define read_c0_tcbind()		__read_32bit_c0_register($2, 2) +#define write_c0_tchalt(val)		__write_32bit_c0_register($2, 4, val) +  #define read_c0_tccontext()		__read_32bit_c0_register($2, 5)  #define write_c0_tccontext(val)		__write_32bit_c0_register($2, 5, val) @@ -176,6 +178,17 @@  #ifndef __ASSEMBLY__ +static inline unsigned core_nvpes(void) +{ +	unsigned conf0; + +	if (!cpu_has_mipsmt) +		return 1; + +	conf0 = read_c0_mvpconf0(); +	return ((conf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1; +} +  static inline unsigned int dvpe(void)  {  	int res = 0;  | 
