diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/kernel/microcode_core.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 8db2eb55e9e2..936d8d55f230 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
| @@ -324,10 +324,6 @@ void microcode_update_cpu(int cpu) | |||
| 324 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 324 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
| 325 | int err = 0; | 325 | int err = 0; |
| 326 | 326 | ||
| 327 | /* We should bind the task to the CPU */ | ||
| 328 | BUG_ON(raw_smp_processor_id() != cpu); | ||
| 329 | |||
| 330 | mutex_lock(µcode_mutex); | ||
| 331 | /* | 327 | /* |
| 332 | * Check if the system resume is in progress (uci->valid != NULL), | 328 | * Check if the system resume is in progress (uci->valid != NULL), |
| 333 | * otherwise just request a firmware: | 329 | * otherwise just request a firmware: |
| @@ -340,11 +336,8 @@ void microcode_update_cpu(int cpu) | |||
| 340 | err = microcode_ops->request_microcode_fw(cpu, | 336 | err = microcode_ops->request_microcode_fw(cpu, |
| 341 | µcode_pdev->dev); | 337 | µcode_pdev->dev); |
| 342 | } | 338 | } |
| 343 | |||
| 344 | if (!err) | 339 | if (!err) |
| 345 | microcode_ops->apply_microcode(cpu); | 340 | microcode_ops->apply_microcode(cpu); |
| 346 | |||
| 347 | mutex_unlock(µcode_mutex); | ||
| 348 | } | 341 | } |
| 349 | 342 | ||
| 350 | static void microcode_init_cpu(int cpu) | 343 | static void microcode_init_cpu(int cpu) |
| @@ -352,7 +345,13 @@ static void microcode_init_cpu(int cpu) | |||
| 352 | cpumask_t old = current->cpus_allowed; | 345 | cpumask_t old = current->cpus_allowed; |
| 353 | 346 | ||
| 354 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 347 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); |
| 348 | /* We should bind the task to the CPU */ | ||
| 349 | BUG_ON(raw_smp_processor_id() != cpu); | ||
| 350 | |||
| 351 | mutex_lock(µcode_mutex); | ||
| 355 | microcode_update_cpu(cpu); | 352 | microcode_update_cpu(cpu); |
| 353 | mutex_unlock(µcode_mutex); | ||
| 354 | |||
| 356 | set_cpus_allowed_ptr(current, &old); | 355 | set_cpus_allowed_ptr(current, &old); |
| 357 | } | 356 | } |
| 358 | 357 | ||
