Merge branch 'topic/cpu-smt' into next
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / smp.c
index 8cb6d1c9026696095f8828c3158ada26ee5d7679..5826f5108a12443c6ff148a422b00ee4900184aa 100644 (file)
@@ -1088,7 +1088,7 @@ static int __init init_big_cores(void)
 
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
-       unsigned int cpu;
+       unsigned int cpu, num_threads;
 
        DBG("smp_prepare_cpus\n");
 
@@ -1155,6 +1155,12 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 
        if (smp_ops && smp_ops->probe)
                smp_ops->probe();
+
+       // Initalise the generic SMT topology support
+       num_threads = 1;
+       if (smt_enabled_at_boot)
+               num_threads = smt_enabled_at_boot;
+       cpu_smt_set_num_threads(num_threads, threads_per_core);
 }
 
 void smp_prepare_boot_cpu(void)