diff options
-rw-r--r-- | arch/mips/include/asm/mipsmtregs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mipsmtregs.h b/arch/mips/include/asm/mipsmtregs.h index 38b7704ee376..6efa79a27b6a 100644 --- a/arch/mips/include/asm/mipsmtregs.h +++ b/arch/mips/include/asm/mipsmtregs.h | |||
@@ -176,6 +176,17 @@ | |||
176 | 176 | ||
177 | #ifndef __ASSEMBLY__ | 177 | #ifndef __ASSEMBLY__ |
178 | 178 | ||
179 | static inline unsigned core_nvpes(void) | ||
180 | { | ||
181 | unsigned conf0; | ||
182 | |||
183 | if (!cpu_has_mipsmt) | ||
184 | return 1; | ||
185 | |||
186 | conf0 = read_c0_mvpconf0(); | ||
187 | return ((conf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1; | ||
188 | } | ||
189 | |||
179 | static inline unsigned int dvpe(void) | 190 | static inline unsigned int dvpe(void) |
180 | { | 191 | { |
181 | int res = 0; | 192 | int res = 0; |