aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/microcode/intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/microcode/intel.c')
-rw-r--r--arch/x86/kernel/cpu/microcode/intel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index a15db2b4e0d6..923054a6b760 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -772,7 +772,7 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
772 return 0; 772 return 0;
773} 773}
774 774
775static int apply_microcode_intel(int cpu) 775static enum ucode_state apply_microcode_intel(int cpu)
776{ 776{
777 struct microcode_intel *mc; 777 struct microcode_intel *mc;
778 struct ucode_cpu_info *uci; 778 struct ucode_cpu_info *uci;
@@ -782,7 +782,7 @@ static int apply_microcode_intel(int cpu)
782 782
783 /* We should bind the task to the CPU */ 783 /* We should bind the task to the CPU */
784 if (WARN_ON(raw_smp_processor_id() != cpu)) 784 if (WARN_ON(raw_smp_processor_id() != cpu))
785 return -1; 785 return UCODE_ERROR;
786 786
787 uci = ucode_cpu_info + cpu; 787 uci = ucode_cpu_info + cpu;
788 mc = uci->mc; 788 mc = uci->mc;
@@ -790,7 +790,7 @@ static int apply_microcode_intel(int cpu)
790 /* Look for a newer patch in our cache: */ 790 /* Look for a newer patch in our cache: */
791 mc = find_patch(uci); 791 mc = find_patch(uci);
792 if (!mc) 792 if (!mc)
793 return 0; 793 return UCODE_NFOUND;
794 } 794 }
795 795
796 /* write microcode via MSR 0x79 */ 796 /* write microcode via MSR 0x79 */
@@ -801,7 +801,7 @@ static int apply_microcode_intel(int cpu)
801 if (rev != mc->hdr.rev) { 801 if (rev != mc->hdr.rev) {
802 pr_err("CPU%d update to revision 0x%x failed\n", 802 pr_err("CPU%d update to revision 0x%x failed\n",
803 cpu, mc->hdr.rev); 803 cpu, mc->hdr.rev);
804 return -1; 804 return UCODE_ERROR;
805 } 805 }
806 806
807 if (rev != prev_rev) { 807 if (rev != prev_rev) {
@@ -818,7 +818,7 @@ static int apply_microcode_intel(int cpu)
818 uci->cpu_sig.rev = rev; 818 uci->cpu_sig.rev = rev;
819 c->microcode = rev; 819 c->microcode = rev;
820 820
821 return 0; 821 return UCODE_UPDATED;
822} 822}
823 823
824static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size, 824static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,