Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136376
b: refs/heads/master
c: c90e785
h: refs/heads/master
v: v3
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Jan 11, 2009
1 parent ec20bc3 commit c20b4ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9b90566cd46e19f670a1e60a717ff243f060a8a
refs/heads/master: c90e785be2fd9dfaef1f030d0314e44052553736
12 changes: 8 additions & 4 deletions trunk/drivers/firmware/dcdbas.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static ssize_t host_control_on_shutdown_store(struct device *dev,
*/
int dcdbas_smi_request(struct smi_cmd *smi_cmd)
{
cpumask_t old_mask;
cpumask_var_t old_mask;
int ret = 0;

if (smi_cmd->magic != SMI_CMD_MAGIC) {
Expand All @@ -254,8 +254,11 @@ int dcdbas_smi_request(struct smi_cmd *smi_cmd)
}

/* SMI requires CPU 0 */
old_mask = current->cpus_allowed;
set_cpus_allowed_ptr(current, &cpumask_of_cpu(0));
if (!alloc_cpumask_var(&old_mask, GFP_KERNEL))
return -ENOMEM;

cpumask_copy(old_mask, &current->cpus_allowed);
set_cpus_allowed_ptr(current, cpumask_of(0));
if (smp_processor_id() != 0) {
dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
__func__);
Expand All @@ -275,7 +278,8 @@ int dcdbas_smi_request(struct smi_cmd *smi_cmd)
);

out:
set_cpus_allowed_ptr(current, &old_mask);
set_cpus_allowed_ptr(current, old_mask);
free_cpumask_var(old_mask);
return ret;
}

Expand Down

0 comments on commit c20b4ac

Please sign in to comment.