#endif
static DEFINE_SPINLOCK(cpufreq_driver_lock);
-/* Used when we unregister cpufreq driver */
-static struct cpumask cpufreq_online_mask;
-
/*
* cpu_policy_rwsem is a per CPU reader-writer semaphore designed to cure
* all cpufreq/hotplug/workqueue/etc related lock issues.
* managing offline cpus here.
*/
cpumask_and(policy->cpus, policy->cpus, cpu_online_mask);
- cpumask_and(policy->cpus, policy->cpus, &cpufreq_online_mask);
policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;
if (unlikely(lock_policy_rwsem_write(cpu)))
BUG();
- cpumask_clear_cpu(cpu, &cpufreq_online_mask);
retval = __cpufreq_remove_dev(dev, sif);
return retval;
}
cpufreq_driver = driver_data;
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
- cpumask_setall(&cpufreq_online_mask);
-
ret = subsys_interface_register(&cpufreq_interface);
if (ret)
goto err_null_driver;