aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/microcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/microcode.c')
-rw-r--r--arch/x86/kernel/microcode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 25cf6dee4e56..69729e38b78a 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -402,7 +402,7 @@ static int do_microcode_update (void)
402 402
403 if (!uci->valid) 403 if (!uci->valid)
404 continue; 404 continue;
405 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 405 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
406 error = get_maching_microcode(new_mc, cpu); 406 error = get_maching_microcode(new_mc, cpu);
407 if (error < 0) 407 if (error < 0)
408 goto out; 408 goto out;
@@ -416,7 +416,7 @@ out:
416 vfree(new_mc); 416 vfree(new_mc);
417 if (cursor < 0) 417 if (cursor < 0)
418 error = cursor; 418 error = cursor;
419 set_cpus_allowed(current, old); 419 set_cpus_allowed_ptr(current, &old);
420 return error; 420 return error;
421} 421}
422 422
@@ -579,7 +579,7 @@ static int apply_microcode_check_cpu(int cpu)
579 return 0; 579 return 0;
580 580
581 old = current->cpus_allowed; 581 old = current->cpus_allowed;
582 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 582 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
583 583
584 /* Check if the microcode we have in memory matches the CPU */ 584 /* Check if the microcode we have in memory matches the CPU */
585 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 || 585 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 ||
@@ -610,7 +610,7 @@ static int apply_microcode_check_cpu(int cpu)
610 " sig=0x%x, pf=0x%x, rev=0x%x\n", 610 " sig=0x%x, pf=0x%x, rev=0x%x\n",
611 cpu, uci->sig, uci->pf, uci->rev); 611 cpu, uci->sig, uci->pf, uci->rev);
612 612
613 set_cpus_allowed(current, old); 613 set_cpus_allowed_ptr(current, &old);
614 return err; 614 return err;
615} 615}
616 616
@@ -621,13 +621,13 @@ static void microcode_init_cpu(int cpu, int resume)
621 621
622 old = current->cpus_allowed; 622 old = current->cpus_allowed;
623 623
624 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 624 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
625 mutex_lock(&microcode_mutex); 625 mutex_lock(&microcode_mutex);
626 collect_cpu_info(cpu); 626 collect_cpu_info(cpu);
627 if (uci->valid && system_state == SYSTEM_RUNNING && !resume) 627 if (uci->valid && system_state == SYSTEM_RUNNING && !resume)
628 cpu_request_microcode(cpu); 628 cpu_request_microcode(cpu);
629 mutex_unlock(&microcode_mutex); 629 mutex_unlock(&microcode_mutex);
630 set_cpus_allowed(current, old); 630 set_cpus_allowed_ptr(current, &old);
631} 631}
632 632
633static void microcode_fini_cpu(int cpu) 633static void microcode_fini_cpu(int cpu)
@@ -657,14 +657,14 @@ static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz)
657 old = current->cpus_allowed; 657 old = current->cpus_allowed;
658 658
659 get_online_cpus(); 659 get_online_cpus();
660 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 660 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
661 661
662 mutex_lock(&microcode_mutex); 662 mutex_lock(&microcode_mutex);
663 if (uci->valid) 663 if (uci->valid)
664 err = cpu_request_microcode(cpu); 664 err = cpu_request_microcode(cpu);
665 mutex_unlock(&microcode_mutex); 665 mutex_unlock(&microcode_mutex);
666 put_online_cpus(); 666 put_online_cpus();
667 set_cpus_allowed(current, old); 667 set_cpus_allowed_ptr(current, &old);
668 } 668 }
669 if (err) 669 if (err)
670 return err; 670 return err;