x86/microcode: Propagate return value from updating functions
... so that callers can know when microcode was updated and act accordingly. Tested-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Ashok Raj <ashok.raj@intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20180216112640.11554-2-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
committed by
Ingo Molnar
parent
eb6174f6d1
commit
3f1f576a19
@ -37,7 +37,12 @@ struct cpu_signature {
|
||||
|
||||
struct device;
|
||||
|
||||
enum ucode_state { UCODE_ERROR, UCODE_OK, UCODE_NFOUND };
|
||||
enum ucode_state {
|
||||
UCODE_OK = 0,
|
||||
UCODE_UPDATED,
|
||||
UCODE_NFOUND,
|
||||
UCODE_ERROR,
|
||||
};
|
||||
|
||||
struct microcode_ops {
|
||||
enum ucode_state (*request_microcode_user) (int cpu,
|
||||
@ -54,7 +59,7 @@ struct microcode_ops {
|
||||
* are being called.
|
||||
* See also the "Synchronization" section in microcode_core.c.
|
||||
*/
|
||||
int (*apply_microcode) (int cpu);
|
||||
enum ucode_state (*apply_microcode) (int cpu);
|
||||
int (*collect_cpu_info) (int cpu, struct cpu_signature *csig);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user