|
@@ -479,12 +479,11 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvi
|
|
static int check_supported_cpu(unsigned int cpu)
|
|
static int check_supported_cpu(unsigned int cpu)
|
|
{
|
|
{
|
|
cpumask_t oldmask;
|
|
cpumask_t oldmask;
|
|
- cpumask_of_cpu_ptr(cpu_mask, cpu);
|
|
|
|
u32 eax, ebx, ecx, edx;
|
|
u32 eax, ebx, ecx, edx;
|
|
unsigned int rc = 0;
|
|
unsigned int rc = 0;
|
|
|
|
|
|
oldmask = current->cpus_allowed;
|
|
oldmask = current->cpus_allowed;
|
|
- set_cpus_allowed_ptr(current, cpu_mask);
|
|
|
|
|
|
+ set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
|
|
|
|
|
|
if (smp_processor_id() != cpu) {
|
|
if (smp_processor_id() != cpu) {
|
|
printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu);
|
|
printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu);
|
|
@@ -1017,7 +1016,6 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i
|
|
static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation)
|
|
static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation)
|
|
{
|
|
{
|
|
cpumask_t oldmask;
|
|
cpumask_t oldmask;
|
|
- cpumask_of_cpu_ptr(cpu_mask, pol->cpu);
|
|
|
|
struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
|
|
struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
|
|
u32 checkfid;
|
|
u32 checkfid;
|
|
u32 checkvid;
|
|
u32 checkvid;
|
|
@@ -1032,7 +1030,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
|
|
|
|
|
|
/* only run on specific CPU from here on */
|
|
/* only run on specific CPU from here on */
|
|
oldmask = current->cpus_allowed;
|
|
oldmask = current->cpus_allowed;
|
|
- set_cpus_allowed_ptr(current, cpu_mask);
|
|
|
|
|
|
+ set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu));
|
|
|
|
|
|
if (smp_processor_id() != pol->cpu) {
|
|
if (smp_processor_id() != pol->cpu) {
|
|
printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
|
|
printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
|
|
@@ -1107,7 +1105,6 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|
{
|
|
{
|
|
struct powernow_k8_data *data;
|
|
struct powernow_k8_data *data;
|
|
cpumask_t oldmask;
|
|
cpumask_t oldmask;
|
|
- cpumask_of_cpu_ptr_declare(newmask);
|
|
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
if (!cpu_online(pol->cpu))
|
|
if (!cpu_online(pol->cpu))
|
|
@@ -1159,8 +1156,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|
|
|
|
|
/* only run on specific CPU from here on */
|
|
/* only run on specific CPU from here on */
|
|
oldmask = current->cpus_allowed;
|
|
oldmask = current->cpus_allowed;
|
|
- cpumask_of_cpu_ptr_next(newmask, pol->cpu);
|
|
|
|
- set_cpus_allowed_ptr(current, newmask);
|
|
|
|
|
|
+ set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu));
|
|
|
|
|
|
if (smp_processor_id() != pol->cpu) {
|
|
if (smp_processor_id() != pol->cpu) {
|
|
printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
|
|
printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
|
|
@@ -1182,7 +1178,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|
set_cpus_allowed_ptr(current, &oldmask);
|
|
set_cpus_allowed_ptr(current, &oldmask);
|
|
|
|
|
|
if (cpu_family == CPU_HW_PSTATE)
|
|
if (cpu_family == CPU_HW_PSTATE)
|
|
- pol->cpus = *newmask;
|
|
|
|
|
|
+ pol->cpus = cpumask_of_cpu(pol->cpu);
|
|
else
|
|
else
|
|
pol->cpus = per_cpu(cpu_core_map, pol->cpu);
|
|
pol->cpus = per_cpu(cpu_core_map, pol->cpu);
|
|
data->available_cores = &(pol->cpus);
|
|
data->available_cores = &(pol->cpus);
|
|
@@ -1248,7 +1244,6 @@ static unsigned int powernowk8_get (unsigned int cpu)
|
|
{
|
|
{
|
|
struct powernow_k8_data *data;
|
|
struct powernow_k8_data *data;
|
|
cpumask_t oldmask = current->cpus_allowed;
|
|
cpumask_t oldmask = current->cpus_allowed;
|
|
- cpumask_of_cpu_ptr(newmask, cpu);
|
|
|
|
unsigned int khz = 0;
|
|
unsigned int khz = 0;
|
|
unsigned int first;
|
|
unsigned int first;
|
|
|
|
|
|
@@ -1258,7 +1253,7 @@ static unsigned int powernowk8_get (unsigned int cpu)
|
|
if (!data)
|
|
if (!data)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- set_cpus_allowed_ptr(current, newmask);
|
|
|
|
|
|
+ set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
|
|
if (smp_processor_id() != cpu) {
|
|
if (smp_processor_id() != cpu) {
|
|
printk(KERN_ERR PFX
|
|
printk(KERN_ERR PFX
|
|
"limiting to CPU %d failed in powernowk8_get\n", cpu);
|
|
"limiting to CPU %d failed in powernowk8_get\n", cpu);
|