lkml.org 
[lkml]   [2009]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] x86, msr: rewrite AMD rd/wrmsr variants
On 08/30/2009 04:50 AM, Borislav Petkov wrote:
> +
> +#define memset(d,c,l) __builtin_memset(d,c,l)
> static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p)
> {
> - int err;
> + u32 gprs[8];
> + int err, i;
> +
> + memset(gprs, 0, sizeof(u32) * 8);
> +
> + gprs[1] = msr;
> + gprs[7] = 0x9c5a203a;
> +
> + err = native_rdmsr_safe_regs(gprs);
> +
> + *p = gprs[0] | ((u64)gprs[2] << 32);
>
> - *p = native_read_msr_amd_safe(msr, &err);
> return err;
> }
>

In file included from
/home/hpa/kernel/linux-2.6-tip.msr/arch/x86/include/asm/processor.h:21,
from
/home/hpa/kernel/linux-2.6-tip.msr/include/linux/prefetch.h:14,
from
/home/hpa/kernel/linux-2.6-tip.msr/include/linux/list.h:6,
from
/home/hpa/kernel/linux-2.6-tip.msr/include/linux/smp.h:11,
from
/home/hpa/kernel/linux-2.6-tip.msr/include/linux/kernel_stat.h:4,
from
/home/hpa/kernel/linux-2.6-tip.msr/arch/x86/kernel/irq_64.c:11:
/home/hpa/kernel/linux-2.6-tip.msr/arch/x86/include/asm/msr.h: In
function ‘rdmsrl_amd_safe’:
/home/hpa/kernel/linux-2.6-tip.msr/arch/x86/include/asm/msr.h:176:
warning: unused variable ‘i’


--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-08-30 22:07    [W:0.158 / U:0.164 seconds]
©2003-2014 Jasper Spaans. Advertise on this site