locking/lockdep: Remove unused @nested argument from lock_release()
[sfrench/cifs-2.6.git] / kernel / cpu.c
index e1967e9eddc2c285faf63e0eb3db90faa306572a..68f85627d909a2df7591c35e5349f4cac939a2d6 100644 (file)
@@ -336,7 +336,7 @@ static void lockdep_acquire_cpus_lock(void)
 
 static void lockdep_release_cpus_lock(void)
 {
-       rwsem_release(&cpu_hotplug_lock.rw_sem.dep_map, 1, _THIS_IP_);
+       rwsem_release(&cpu_hotplug_lock.rw_sem.dep_map, _THIS_IP_);
 }
 
 /*
@@ -392,8 +392,7 @@ enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED;
 
 void __init cpu_smt_disable(bool force)
 {
-       if (cpu_smt_control == CPU_SMT_FORCE_DISABLED ||
-               cpu_smt_control == CPU_SMT_NOT_SUPPORTED)
+       if (!cpu_smt_possible())
                return;
 
        if (force) {
@@ -438,6 +437,14 @@ static inline bool cpu_smt_allowed(unsigned int cpu)
         */
        return !cpumask_test_cpu(cpu, &cpus_booted_once_mask);
 }
+
+/* Returns true if SMT is not supported of forcefully (irreversibly) disabled */
+bool cpu_smt_possible(void)
+{
+       return cpu_smt_control != CPU_SMT_FORCE_DISABLED &&
+               cpu_smt_control != CPU_SMT_NOT_SUPPORTED;
+}
+EXPORT_SYMBOL_GPL(cpu_smt_possible);
 #else
 static inline bool cpu_smt_allowed(unsigned int cpu) { return true; }
 #endif