aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/microcode_amd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 4006e5e3adf0..d606a05545ca 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -206,6 +206,7 @@ static void apply_microcode_amd(int cpu)
206 unsigned int rev; 206 unsigned int rev;
207 int cpu_num = raw_smp_processor_id(); 207 int cpu_num = raw_smp_processor_id();
208 struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; 208 struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num;
209 unsigned long addr;
209 210
210 /* We should bind the task to the CPU */ 211 /* We should bind the task to the CPU */
211 BUG_ON(cpu_num != cpu); 212 BUG_ON(cpu_num != cpu);
@@ -215,10 +216,9 @@ static void apply_microcode_amd(int cpu)
215 216
216 spin_lock_irqsave(&microcode_update_lock, flags); 217 spin_lock_irqsave(&microcode_update_lock, flags);
217 218
218 edx = (unsigned int)(((unsigned long) 219 addr = (unsigned long)&uci->mc.mc_amd->hdr.data_code;
219 &(uci->mc.mc_amd->hdr.data_code)) >> 32); 220 edx = (unsigned int)(((unsigned long)upper_32_bits(addr)));
220 eax = (unsigned int)(((unsigned long) 221 eax = (unsigned int)(((unsigned long)lower_32_bits(addr)));
221 &(uci->mc.mc_amd->hdr.data_code)) & 0xffffffffL);
222 222
223 asm volatile("movl %0, %%ecx; wrmsr" : 223 asm volatile("movl %0, %%ecx; wrmsr" :
224 : "i" (0xc0010020), "a" (eax), "d" (edx) : "ecx"); 224 : "i" (0xc0010020), "a" (eax), "d" (edx) : "ecx");