aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/microcode_intel.h2
-rw-r--r--arch/x86/kernel/cpu/microcode/intel.c4
-rw-r--r--arch/x86/kernel/cpu/microcode/intel_early.c8
-rw-r--r--arch/x86/kernel/cpu/microcode/intel_lib.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h
index 3564299863f0..8e87e6fe98b5 100644
--- a/arch/x86/include/asm/microcode_intel.h
+++ b/arch/x86/include/asm/microcode_intel.h
@@ -56,7 +56,7 @@ struct extended_sigtable {
56 56
57#define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE) 57#define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE)
58 58
59extern int get_matching_microcode(unsigned int csig, int cpf, int rev, void *mc); 59extern int has_newer_microcode(void *mc, unsigned int csig, int cpf, int rev);
60extern int microcode_sanity_check(void *mc, int print_err); 60extern int microcode_sanity_check(void *mc, int print_err);
61extern int get_matching_sig(unsigned int csig, int cpf, void *mc); 61extern int get_matching_sig(unsigned int csig, int cpf, void *mc);
62 62
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index e20d4e58cd89..969dc17eb1b4 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -63,7 +63,7 @@ static int get_matching_mc(struct microcode_intel *mc_intel, int cpu)
63 cpf = cpu_sig.pf; 63 cpf = cpu_sig.pf;
64 crev = cpu_sig.rev; 64 crev = cpu_sig.rev;
65 65
66 return get_matching_microcode(csig, cpf, crev, mc_intel); 66 return has_newer_microcode(mc_intel, csig, cpf, crev);
67} 67}
68 68
69static int apply_microcode_intel(int cpu) 69static int apply_microcode_intel(int cpu)
@@ -165,7 +165,7 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
165 165
166 csig = uci->cpu_sig.sig; 166 csig = uci->cpu_sig.sig;
167 cpf = uci->cpu_sig.pf; 167 cpf = uci->cpu_sig.pf;
168 if (get_matching_microcode(csig, cpf, new_rev, mc)) { 168 if (has_newer_microcode(mc, csig, cpf, new_rev)) {
169 vfree(new_mc); 169 vfree(new_mc);
170 new_rev = mc_header.rev; 170 new_rev = mc_header.rev;
171 new_mc = mc; 171 new_mc = mc;
diff --git a/arch/x86/kernel/cpu/microcode/intel_early.c b/arch/x86/kernel/cpu/microcode/intel_early.c
index ccd474a7a59e..5f828268357d 100644
--- a/arch/x86/kernel/cpu/microcode/intel_early.c
+++ b/arch/x86/kernel/cpu/microcode/intel_early.c
@@ -59,10 +59,10 @@ load_microcode_early(struct microcode_intel **saved,
59 ucode_ptr = saved[i]; 59 ucode_ptr = saved[i];
60 mc_hdr = (struct microcode_header_intel *)ucode_ptr; 60 mc_hdr = (struct microcode_header_intel *)ucode_ptr;
61 61
62 ret = get_matching_microcode(uci->cpu_sig.sig, 62 ret = has_newer_microcode(ucode_ptr,
63 uci->cpu_sig.pf, 63 uci->cpu_sig.sig,
64 new_rev, 64 uci->cpu_sig.pf,
65 ucode_ptr); 65 new_rev);
66 if (!ret) 66 if (!ret)
67 continue; 67 continue;
68 68
diff --git a/arch/x86/kernel/cpu/microcode/intel_lib.c b/arch/x86/kernel/cpu/microcode/intel_lib.c
index 7de293726923..425f8e29b795 100644
--- a/arch/x86/kernel/cpu/microcode/intel_lib.c
+++ b/arch/x86/kernel/cpu/microcode/intel_lib.c
@@ -154,7 +154,7 @@ int get_matching_sig(unsigned int csig, int cpf, void *mc)
154/* 154/*
155 * Returns 1 if update has been found, 0 otherwise. 155 * Returns 1 if update has been found, 0 otherwise.
156 */ 156 */
157int get_matching_microcode(unsigned int csig, int cpf, int new_rev, void *mc) 157int has_newer_microcode(void *mc, unsigned int csig, int cpf, int new_rev)
158{ 158{
159 struct microcode_header_intel *mc_hdr = mc; 159 struct microcode_header_intel *mc_hdr = mc;
160 160
@@ -163,4 +163,4 @@ int get_matching_microcode(unsigned int csig, int cpf, int new_rev, void *mc)
163 163
164 return get_matching_sig(csig, cpf, mc); 164 return get_matching_sig(csig, cpf, mc);
165} 165}
166EXPORT_SYMBOL_GPL(get_matching_microcode); 166EXPORT_SYMBOL_GPL(has_newer_microcode);