--- linux/drivers/acpi/processor_perflib.c.orig 2009-07-25 18:39:27.000000000 -0700 +++ linux/drivers/acpi/processor_perflib.c 2009-07-25 18:49:56.000000000 -0700 @@ -521,13 +521,20 @@ if (pr->performance) { retval = -EBUSY; - continue; + goto err_out; } if (!performance || !percpu_ptr(performance, i)) { retval = -EINVAL; - continue; + goto err_out; } + } + + /* Call _PSD for all CPUs */ + for_each_possible_cpu(i) { + pr = per_cpu(processors, i); + if (!pr) + continue; pr->performance = percpu_ptr(performance, i); cpumask_set_cpu(i, pr->performance->shared_cpu_map); @@ -543,26 +550,6 @@ * Now that we have _PSD data from all CPUs, lets setup P-state * domain info. */ - for_each_possible_cpu(i) { - pr = per_cpu(processors, i); - if (!pr) - continue; - - /* Basic validity check for domain info */ - pdomain = &(pr->performance->domain_info); - if ((pdomain->revision != ACPI_PSD_REV0_REVISION) || - (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES)) { - retval = -EINVAL; - goto err_ret; - } - if (pdomain->coord_type != DOMAIN_COORD_TYPE_SW_ALL && - pdomain->coord_type != DOMAIN_COORD_TYPE_SW_ANY && - pdomain->coord_type != DOMAIN_COORD_TYPE_HW_ALL) { - retval = -EINVAL; - goto err_ret; - } - } - cpumask_clear(covered_cpus); for_each_possible_cpu(i) { pr = per_cpu(processors, i); @@ -651,6 +638,7 @@ pr->performance = NULL; /* Will be set for real in register */ } +err_out: mutex_unlock(&performance_mutex); free_cpumask_var(covered_cpus); return retval;