From 0ace043e6f4df6ce20d32524923e732a185853bf Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Mon, 7 Jan 2013 13:34:27 -0600 Subject: Support for less than 8 threads per core Modified anywhere that we enable non-master threads to only touch the threads that we are told to update. Change-Id: I5b764e51d85a5c663ac76164e9465831ef0c167c RTC: 48808 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2877 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III --- src/kernel/cpumgr.C | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/kernel/cpumgr.C') diff --git a/src/kernel/cpumgr.C b/src/kernel/cpumgr.C index 954232b2d..436930de7 100644 --- a/src/kernel/cpumgr.C +++ b/src/kernel/cpumgr.C @@ -381,7 +381,7 @@ void CpuManager::executePeriodics(cpu_t * i_cpu) } -int CpuManager::startCore(uint64_t pir) +int CpuManager::startCore(uint64_t pir,uint64_t i_threads) { size_t threads = getThreadCount(); pir = pir & ~(threads-1); @@ -394,7 +394,11 @@ int CpuManager::startCore(uint64_t pir) for(size_t i = 0; i < threads; i++) { - Singleton::instance().startCPU(pir + i); + // Only start the threads we were told to start + if( i_threads & (0x8000000000000000 >> i) ) + { + Singleton::instance().startCPU(pir + i); + } } __sync_synchronize(); -- cgit v1.2.1