aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smp-mt.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-03-02 15:42:04 -0500
committerRalf Baechle <ralf@linux-mips.org>2008-01-29 05:14:57 -0500
commit0ab7aefc4d43a6dee26c891b41ef9c7a67d2379b (patch)
tree4a627b7079979ad43b08cef297b2a6eb78d0a78e /arch/mips/kernel/smp-mt.c
parent92b1e6a64a8d9d5ed3ec8797eed8b36e2164a410 (diff)
[MIPS] MT: Scheduler support for SMT
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/smp-mt.c')
-rw-r--r--arch/mips/kernel/smp-mt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 94e210cc6cb6..2ab0b7eeaa7e 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -22,6 +22,7 @@
22#include <linux/cpumask.h> 22#include <linux/cpumask.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/compiler.h> 24#include <linux/compiler.h>
25#include <linux/smp.h>
25 26
26#include <asm/atomic.h> 27#include <asm/atomic.h>
27#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
@@ -30,7 +31,6 @@
30#include <asm/system.h> 31#include <asm/system.h>
31#include <asm/hardirq.h> 32#include <asm/hardirq.h>
32#include <asm/mmu_context.h> 33#include <asm/mmu_context.h>
33#include <asm/smp.h>
34#include <asm/time.h> 34#include <asm/time.h>
35#include <asm/mipsregs.h> 35#include <asm/mipsregs.h>
36#include <asm/mipsmtregs.h> 36#include <asm/mipsmtregs.h>
@@ -223,6 +223,7 @@ static void __init smp_tc_init(unsigned int tc, unsigned int mvpconf0)
223void __init plat_smp_setup(void) 223void __init plat_smp_setup(void)
224{ 224{
225 unsigned int mvpconf0, ntc, tc, ncpu = 0; 225 unsigned int mvpconf0, ntc, tc, ncpu = 0;
226 unsigned int nvpe;
226 227
227#ifdef CONFIG_MIPS_MT_FPAFF 228#ifdef CONFIG_MIPS_MT_FPAFF
228 /* If we have an FPU, enroll ourselves in the FPU-full mask */ 229 /* If we have an FPU, enroll ourselves in the FPU-full mask */
@@ -242,6 +243,9 @@ void __init plat_smp_setup(void)
242 mvpconf0 = read_c0_mvpconf0(); 243 mvpconf0 = read_c0_mvpconf0();
243 ntc = (mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT; 244 ntc = (mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT;
244 245
246 nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1;
247 smp_num_siblings = nvpe;
248
245 /* we'll always have more TC's than VPE's, so loop setting everything 249 /* we'll always have more TC's than VPE's, so loop setting everything
246 to a sensible state */ 250 to a sensible state */
247 for (tc = 0; tc <= ntc; tc++) { 251 for (tc = 0; tc <= ntc; tc++) {