File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
arch/x86/kernel/cpu/microcode Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -499,27 +499,22 @@ static int check_online_cpus(void)
499
499
static enum ucode_state reload_for_cpu (int cpu )
500
500
{
501
501
struct ucode_cpu_info * uci = ucode_cpu_info + cpu ;
502
- enum ucode_state ustate ;
503
502
504
503
if (!uci -> valid )
505
504
return UCODE_OK ;
506
505
507
- ustate = microcode_ops -> request_microcode_fw (cpu , & microcode_pdev -> dev , true);
508
- if (ustate != UCODE_OK )
509
- return ustate ;
510
-
511
506
return apply_microcode_on_target (cpu );
512
507
}
513
508
514
509
static ssize_t reload_store (struct device * dev ,
515
510
struct device_attribute * attr ,
516
511
const char * buf , size_t size )
517
512
{
513
+ int cpu , bsp = boot_cpu_data .cpu_index ;
518
514
enum ucode_state tmp_ret = UCODE_OK ;
519
515
bool do_callback = false;
520
516
unsigned long val ;
521
517
ssize_t ret = 0 ;
522
- int cpu ;
523
518
524
519
ret = kstrtoul (buf , 0 , & val );
525
520
if (ret )
@@ -528,6 +523,10 @@ static ssize_t reload_store(struct device *dev,
528
523
if (val != 1 )
529
524
return size ;
530
525
526
+ tmp_ret = microcode_ops -> request_microcode_fw (bsp , & microcode_pdev -> dev , true);
527
+ if (tmp_ret != UCODE_OK )
528
+ return size ;
529
+
531
530
get_online_cpus ();
532
531
533
532
ret = check_online_cpus ();
You can’t perform that action at this time.
0 commit comments