diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_throttling.c | 11 | ||||
-rw-r--r-- | drivers/firmware/dcdbas.c | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index a56fc6c4394b..a2c3f9cfa549 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -827,6 +827,7 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) | |||
827 | static int acpi_processor_get_throttling(struct acpi_processor *pr) | 827 | static int acpi_processor_get_throttling(struct acpi_processor *pr) |
828 | { | 828 | { |
829 | cpumask_t saved_mask; | 829 | cpumask_t saved_mask; |
830 | cpumask_of_cpu_ptr_declare(new_mask); | ||
830 | int ret; | 831 | int ret; |
831 | 832 | ||
832 | if (!pr) | 833 | if (!pr) |
@@ -838,7 +839,8 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr) | |||
838 | * Migrate task to the cpu pointed by pr. | 839 | * Migrate task to the cpu pointed by pr. |
839 | */ | 840 | */ |
840 | saved_mask = current->cpus_allowed; | 841 | saved_mask = current->cpus_allowed; |
841 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(pr->id)); | 842 | cpumask_of_cpu_ptr_next(new_mask, pr->id); |
843 | set_cpus_allowed_ptr(current, new_mask); | ||
842 | ret = pr->throttling.acpi_processor_get_throttling(pr); | 844 | ret = pr->throttling.acpi_processor_get_throttling(pr); |
843 | /* restore the previous state */ | 845 | /* restore the previous state */ |
844 | set_cpus_allowed_ptr(current, &saved_mask); | 846 | set_cpus_allowed_ptr(current, &saved_mask); |
@@ -987,6 +989,7 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, | |||
987 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | 989 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state) |
988 | { | 990 | { |
989 | cpumask_t saved_mask; | 991 | cpumask_t saved_mask; |
992 | cpumask_of_cpu_ptr_declare(new_mask); | ||
990 | int ret = 0; | 993 | int ret = 0; |
991 | unsigned int i; | 994 | unsigned int i; |
992 | struct acpi_processor *match_pr; | 995 | struct acpi_processor *match_pr; |
@@ -1025,7 +1028,8 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | |||
1025 | * it can be called only for the cpu pointed by pr. | 1028 | * it can be called only for the cpu pointed by pr. |
1026 | */ | 1029 | */ |
1027 | if (p_throttling->shared_type == DOMAIN_COORD_TYPE_SW_ANY) { | 1030 | if (p_throttling->shared_type == DOMAIN_COORD_TYPE_SW_ANY) { |
1028 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(pr->id)); | 1031 | cpumask_of_cpu_ptr_next(new_mask, pr->id); |
1032 | set_cpus_allowed_ptr(current, new_mask); | ||
1029 | ret = p_throttling->acpi_processor_set_throttling(pr, | 1033 | ret = p_throttling->acpi_processor_set_throttling(pr, |
1030 | t_state.target_state); | 1034 | t_state.target_state); |
1031 | } else { | 1035 | } else { |
@@ -1056,7 +1060,8 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | |||
1056 | continue; | 1060 | continue; |
1057 | } | 1061 | } |
1058 | t_state.cpu = i; | 1062 | t_state.cpu = i; |
1059 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(i)); | 1063 | cpumask_of_cpu_ptr_next(new_mask, i); |
1064 | set_cpus_allowed_ptr(current, new_mask); | ||
1060 | ret = match_pr->throttling. | 1065 | ret = match_pr->throttling. |
1061 | acpi_processor_set_throttling( | 1066 | acpi_processor_set_throttling( |
1062 | match_pr, t_state.target_state); | 1067 | match_pr, t_state.target_state); |
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index 25918f7dfd0f..0b624e927a6f 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c | |||
@@ -254,6 +254,7 @@ static ssize_t host_control_on_shutdown_store(struct device *dev, | |||
254 | static int smi_request(struct smi_cmd *smi_cmd) | 254 | static int smi_request(struct smi_cmd *smi_cmd) |
255 | { | 255 | { |
256 | cpumask_t old_mask; | 256 | cpumask_t old_mask; |
257 | cpumask_of_cpu_ptr(new_mask, 0); | ||
257 | int ret = 0; | 258 | int ret = 0; |
258 | 259 | ||
259 | if (smi_cmd->magic != SMI_CMD_MAGIC) { | 260 | if (smi_cmd->magic != SMI_CMD_MAGIC) { |
@@ -264,7 +265,7 @@ static int smi_request(struct smi_cmd *smi_cmd) | |||
264 | 265 | ||
265 | /* SMI requires CPU 0 */ | 266 | /* SMI requires CPU 0 */ |
266 | old_mask = current->cpus_allowed; | 267 | old_mask = current->cpus_allowed; |
267 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(0)); | 268 | set_cpus_allowed_ptr(current, new_mask); |
268 | if (smp_processor_id() != 0) { | 269 | if (smp_processor_id() != 0) { |
269 | dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n", | 270 | dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n", |
270 | __func__); | 271 | __func__); |