diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2012-06-01 16:52:38 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-06-07 11:43:30 -0700 |
commit | 2c929ce6f1ed1302be225512b433e6a6554f71a4 (patch) | |
tree | f5d6a3ad8a98eca809ac1ad1c348a9a1a8986b9d /arch/x86/include/asm/msr.h | |
parent | 169e9cbd77db23fe50bc8ba68bf081adb67b4220 (diff) | |
download | linux-stable-2c929ce6f1ed1302be225512b433e6a6554f71a4.tar.gz linux-stable-2c929ce6f1ed1302be225512b433e6a6554f71a4.tar.bz2 linux-stable-2c929ce6f1ed1302be225512b433e6a6554f71a4.zip |
x86, cpu, amd: Deprecate AMD-specific MSR variants
Now that all users of {rd,wr}msr_amd_safe have been fixed, deprecate its
use by making them private to amd.c and adding warnings when used on
anything else beside K8.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Link: http://lkml.kernel.org/r/1338562358-28182-5-git-send-email-bp@amd64.org
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm/msr.h')
-rw-r--r-- | arch/x86/include/asm/msr.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 81860cc012d1..cb33b5f00267 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -211,33 +211,6 @@ do { \ #endif /* !CONFIG_PARAVIRT */ -static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p) -{ - u32 gprs[8] = { 0 }; - int err; - - gprs[1] = msr; - gprs[7] = 0x9c5a203a; - - err = rdmsr_safe_regs(gprs); - - *p = gprs[0] | ((u64)gprs[2] << 32); - - return err; -} - -static inline int wrmsrl_amd_safe(unsigned msr, unsigned long long val) -{ - u32 gprs[8] = { 0 }; - - gprs[0] = (u32)val; - gprs[1] = msr; - gprs[2] = val >> 32; - gprs[7] = 0x9c5a203a; - - return wrmsr_safe_regs(gprs); -} - #define checking_wrmsrl(msr, val) wrmsr_safe((msr), (u32)(val), \ (u32)((val) >> 32)) |