lkml.org 
[lkml]   [2014]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:x86/urgent] x86: Fix typo preventing msr_set/ clear_bit from having an effect
Commit-ID:  722a0d22d028bd74061cf582de1764884e73674f
Gitweb: http://git.kernel.org/tip/722a0d22d028bd74061cf582de1764884e73674f
Author: Andres Freund <andres@anarazel.de>
AuthorDate: Fri, 9 May 2014 03:29:16 +0200
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 9 May 2014 08:42:32 -0700

x86: Fix typo preventing msr_set/clear_bit from having an effect

Due to a typo the msr accessor function introduced in
22085a66c2fab6cf9b9393c056a3600a6b4735de didn't have any lasting
effects because they accidentally wrote the old value back.

After c0a639ad0bc6b178b46996bd1f821a04643e2bde this at the very least
this causes cpuid limits not to be lifted on some cpus leading to
missing capabilities for those.

Signed-off-by: Andres Freund <andres@anarazel.de>
Link: http://lkml.kernel.org/r/1399598957-7011-2-git-send-email-andres@anarazel.de
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/lib/msr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/lib/msr.c b/arch/x86/lib/msr.c
index db9db44..4362373 100644
--- a/arch/x86/lib/msr.c
+++ b/arch/x86/lib/msr.c
@@ -76,7 +76,7 @@ static inline int __flip_bit(u32 msr, u8 bit, bool set)
if (m1.q == m.q)
return 0;

- err = msr_write(msr, &m);
+ err = msr_write(msr, &m1);
if (err)
return err;


\
 
 \ /
  Last update: 2014-05-09 19:21    [W:0.171 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site