[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A9ADB59.2020508@zytor.com>
Date: Sun, 30 Aug 2009 13:04:41 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <petkovbb@...glemail.com>
CC: mingo@...hat.com, linux-kernel@...r.kernel.org,
kjwinchester@...il.com, tglx@...utronix.de,
borislav.petkov@....com, linux-tip-commits@...r.kernel.org
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists