]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix warning in arch/x86/kernel/microcode_amd.c
authorIngo Molnar <mingo@elte.hu>
Fri, 19 Dec 2008 00:36:14 +0000 (01:36 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 19 Dec 2008 00:31:54 +0000 (01:31 +0100)
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>
arch/x86/kernel/microcode_amd.c

index 24c256f4e50a32a7892e29883dd8459660c9450e..c25fdb38229212cb5e5ad79f527770bb9063153e 100644 (file)
@@ -160,7 +160,7 @@ static void apply_microcode_amd(int cpu)
                return;
 
        spin_lock_irqsave(&microcode_update_lock, flags);
-       wrmsrl(MSR_AMD64_PATCH_LOADER, &mc_amd->hdr.data_code);
+       wrmsrl(MSR_AMD64_PATCH_LOADER, (u64)(long)&mc_amd->hdr.data_code);
        /* get patch id after patching */
        rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy);
        spin_unlock_irqrestore(&microcode_update_lock, flags);
@@ -372,3 +372,4 @@ struct microcode_ops * __init init_amd_microcode(void)
 {
        return &microcode_amd_ops;
 }
+