Skip to content

Commit f34a10b

Browse files
author
Ingo Molnar
committed
x86: fix warning in arch/x86/kernel/microcode_amd.c
this warning: arch/x86/kernel/microcode_amd.c: In function ‘apply_microcode_amd’: arch/x86/kernel/microcode_amd.c:163: warning: cast from pointer to integer of different size arch/x86/kernel/microcode_amd.c:163: warning: cast from pointer to integer of different size triggers because we want to pass the address to the microcode MSR, which is 64-bit even on 32-bit. Cast it explicitly to express this. Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent df23cab commit f34a10b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/x86/kernel/microcode_amd.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static void apply_microcode_amd(int cpu)
160160
return;
161161

162162
spin_lock_irqsave(&microcode_update_lock, flags);
163-
wrmsrl(MSR_AMD64_PATCH_LOADER, &mc_amd->hdr.data_code);
163+
wrmsrl(MSR_AMD64_PATCH_LOADER, (u64)(long)&mc_amd->hdr.data_code);
164164
/* get patch id after patching */
165165
rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);
166166
spin_unlock_irqrestore(&microcode_update_lock, flags);
@@ -372,3 +372,4 @@ struct microcode_ops * __init init_amd_microcode(void)
372372
{
373373
return &microcode_amd_ops;
374374
}
375+

0 commit comments

Comments
 (0)