From d00196cc3d91e496ab3cff89eeb1d15a8ad3fa90 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 21 Aug 2008 13:43:51 -0700 Subject: [PATCH] --- yaml --- r: 113335 b: refs/heads/master c: 5b792d320f28ff83dd4c13f984807e26235f7703 h: refs/heads/master i: 113333: c5d56c45ab198aa07409d2209113a12c9dff0169 113331: f315b1feb007552606f2db859e314e63a555f207 113327: a66d7221ceca543d986c683139fc4f6290fa45ad v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/microcode_amd.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9b2fbb33383d..683d8a6e8bc6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d45de40934897c6ee5b05141f7895bbb28512395 +refs/heads/master: 5b792d320f28ff83dd4c13f984807e26235f7703 diff --git a/trunk/arch/x86/kernel/microcode_amd.c b/trunk/arch/x86/kernel/microcode_amd.c index 4006e5e3adf0..d606a05545ca 100644 --- a/trunk/arch/x86/kernel/microcode_amd.c +++ b/trunk/arch/x86/kernel/microcode_amd.c @@ -206,6 +206,7 @@ static void apply_microcode_amd(int cpu) unsigned int rev; int cpu_num = raw_smp_processor_id(); struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; + unsigned long addr; /* We should bind the task to the CPU */ BUG_ON(cpu_num != cpu); @@ -215,10 +216,9 @@ static void apply_microcode_amd(int cpu) spin_lock_irqsave(µcode_update_lock, flags); - edx = (unsigned int)(((unsigned long) - &(uci->mc.mc_amd->hdr.data_code)) >> 32); - eax = (unsigned int)(((unsigned long) - &(uci->mc.mc_amd->hdr.data_code)) & 0xffffffffL); + addr = (unsigned long)&uci->mc.mc_amd->hdr.data_code; + edx = (unsigned int)(((unsigned long)upper_32_bits(addr))); + eax = (unsigned int)(((unsigned long)lower_32_bits(addr))); asm volatile("movl %0, %%ecx; wrmsr" : : "i" (0xc0010020), "a" (eax), "d" (edx) : "ecx");