diff options
| author | Fenghua Yu <fenghua.yu@intel.com> | 2012-12-20 23:44:22 -0800 | 
|---|---|---|
| committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-31 13:18:50 -0800 | 
| commit | 9cd4d78e21cfdc709b1af516214ec4f69ee0e6bd (patch) | |
| tree | b0ef02c28868fabf5ac8372c4078819d375b9ee4 /arch/x86/kernel/microcode_core.c | |
| parent | 0d91ea86a895b911fd7d999acb3f600706d9c8cd (diff) | |
| download | olio-linux-3.10-9cd4d78e21cfdc709b1af516214ec4f69ee0e6bd.tar.xz olio-linux-3.10-9cd4d78e21cfdc709b1af516214ec4f69ee0e6bd.zip  | |
x86/microcode_intel.h: Define functions and macros for early loading ucode
Define some functions and macros that will be used in early loading ucode. Some
of them are moved from microcode_intel.c driver in order to be called in early
boot phase before module can be called.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1356075872-3054-3-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/microcode_core.c')
| -rw-r--r-- | arch/x86/kernel/microcode_core.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 3a04b224d0c..22db92bbdf1 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c @@ -364,10 +364,7 @@ static struct attribute_group mc_attr_group = {  static void microcode_fini_cpu(int cpu)  { -	struct ucode_cpu_info *uci = ucode_cpu_info + cpu; -  	microcode_ops->microcode_fini_cpu(cpu); -	uci->valid = 0;  }  static enum ucode_state microcode_resume_cpu(int cpu) @@ -383,6 +380,10 @@ static enum ucode_state microcode_resume_cpu(int cpu)  static enum ucode_state microcode_init_cpu(int cpu, bool refresh_fw)  {  	enum ucode_state ustate; +	struct ucode_cpu_info *uci = ucode_cpu_info + cpu; + +	if (uci && uci->valid) +		return UCODE_OK;  	if (collect_cpu_info(cpu))  		return UCODE_ERROR;  |