]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/processor_throttling.c
cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
[linux-2.6-omap-h63xx.git] / drivers / acpi / processor_throttling.c
index a56fc6c4394bb1dab26cb06527d3f89239333683..a2c3f9cfa5490fe5fef15c4c0e48676ad22f837a 100644 (file)
@@ -827,6 +827,7 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
 static int acpi_processor_get_throttling(struct acpi_processor *pr)
 {
        cpumask_t saved_mask;
+       cpumask_of_cpu_ptr_declare(new_mask);
        int ret;
 
        if (!pr)
@@ -838,7 +839,8 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr)
         * Migrate task to the cpu pointed by pr.
         */
        saved_mask = current->cpus_allowed;
-       set_cpus_allowed_ptr(current, &cpumask_of_cpu(pr->id));
+       cpumask_of_cpu_ptr_next(new_mask, pr->id);
+       set_cpus_allowed_ptr(current, new_mask);
        ret = pr->throttling.acpi_processor_get_throttling(pr);
        /* restore the previous state */
        set_cpus_allowed_ptr(current, &saved_mask);
@@ -987,6 +989,7 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
 int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
 {
        cpumask_t saved_mask;
+       cpumask_of_cpu_ptr_declare(new_mask);
        int ret = 0;
        unsigned int i;
        struct acpi_processor *match_pr;
@@ -1025,7 +1028,8 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
         * it can be called only for the cpu pointed by pr.
         */
        if (p_throttling->shared_type == DOMAIN_COORD_TYPE_SW_ANY) {
-               set_cpus_allowed_ptr(current, &cpumask_of_cpu(pr->id));
+               cpumask_of_cpu_ptr_next(new_mask, pr->id);
+               set_cpus_allowed_ptr(current, new_mask);
                ret = p_throttling->acpi_processor_set_throttling(pr,
                                                t_state.target_state);
        } else {
@@ -1056,7 +1060,8 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
                                continue;
                        }
                        t_state.cpu = i;
-                       set_cpus_allowed_ptr(current, &cpumask_of_cpu(i));
+                       cpumask_of_cpu_ptr_next(new_mask, i);
+                       set_cpus_allowed_ptr(current, new_mask);
                        ret = match_pr->throttling.
                                acpi_processor_set_throttling(
                                match_pr, t_state.target_state);