From 8ddfd6f5517f0fc7ec42de90115861e14d9144eb Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Fri, 9 May 2014 03:29:16 +0200 Subject: [PATCH] x86: Fix typo preventing msr_set/clear_bit from having an effect Due to a typo the msr accessor function introduced in d7a29be73a88dd346b98a2216bf779054202a542 didn't have any lasting effects because they accidentally wrote the old value back. After 4a6d3bcb1b67bc265a002399ac800e1822e7439c 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 Link: http://lkml.kernel.org/r/1399598957-7011-2-git-send-email-andres@anarazel.de Cc: Borislav Petkov Signed-off-by: H. Peter Anvin --- 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 db9db446b71a6..43623739c7cf3 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; -- 2.39.5