diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-09-15 15:44:38 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-09-15 15:44:38 +0100 |
commit | c694aed7c42e6f46de4afabdbe2c19734918d531 (patch) | |
tree | b4f83c8ab71091b5fcb31e34cda5e0fd35e19d4a /xen/arch/x86/microcode_amd.c | |
parent | 6266fa7f2477589319a7abc1471b01b8b1d17a7b (diff) | |
download | xen-c694aed7c42e6f46de4afabdbe2c19734918d531.tar.gz xen-c694aed7c42e6f46de4afabdbe2c19734918d531.tar.bz2 xen-c694aed7c42e6f46de4afabdbe2c19734918d531.zip |
x86: Fix 32-bit build after AMD microcode update patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/microcode_amd.c')
-rw-r--r-- | xen/arch/x86/microcode_amd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c index d2198d5838..add5b78600 100644 --- a/xen/arch/x86/microcode_amd.c +++ b/xen/arch/x86/microcode_amd.c @@ -170,11 +170,10 @@ out: static int apply_microcode_amd(int cpu) { unsigned long flags; - unsigned int eax, edx; - unsigned int rev; + uint32_t eax, edx, rev; int cpu_num = raw_smp_processor_id(); struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - unsigned long addr; + uint64_t addr; /* We should bind the task to the CPU */ BUG_ON(cpu_num != cpu); @@ -185,8 +184,8 @@ static int apply_microcode_amd(int cpu) spin_lock_irqsave(µcode_update_lock, flags); addr = (unsigned long)&uci->mc.mc_amd->hdr.data_code; - edx = (unsigned int)((unsigned long)(addr >> 32)); - eax = (unsigned int)((unsigned long)(addr & 0xffffffff)); + edx = (uint32_t)(addr >> 32); + eax = (uint32_t)addr; asm volatile("movl %0, %%ecx; wrmsr" : : "i" (MSR_AMD_PATCHLOADER), "a" (eax), "d" (edx) : "ecx"); |