Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113344
b: refs/heads/master
c: fd1452e
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Adamushko authored and Ingo Molnar committed Oct 2, 2008
1 parent 3ca5859 commit ecd335f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 82b078659ed04e1ecdebf8326e189cf76ed361af
refs/heads/master: fd1452ebf257317f24e0e285a17a2ec2ce3e6df7
13 changes: 6 additions & 7 deletions trunk/arch/x86/kernel/microcode_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,6 @@ void microcode_update_cpu(int cpu)
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
int err = 0;

/* We should bind the task to the CPU */
BUG_ON(raw_smp_processor_id() != cpu);

mutex_lock(&microcode_mutex);
/*
* Check if the system resume is in progress (uci->valid != NULL),
* otherwise just request a firmware:
Expand All @@ -340,19 +336,22 @@ void microcode_update_cpu(int cpu)
err = microcode_ops->request_microcode_fw(cpu,
&microcode_pdev->dev);
}

if (!err)
microcode_ops->apply_microcode(cpu);

mutex_unlock(&microcode_mutex);
}

static void microcode_init_cpu(int cpu)
{
cpumask_t old = current->cpus_allowed;

set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
/* We should bind the task to the CPU */
BUG_ON(raw_smp_processor_id() != cpu);

mutex_lock(&microcode_mutex);
microcode_update_cpu(cpu);
mutex_unlock(&microcode_mutex);

set_cpus_allowed_ptr(current, &old);
}

Expand Down

0 comments on commit ecd335f

Please sign in to comment.