[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-679bcea857d72868e3431dde3a0e158bf0ed9119@git.kernel.org>
Date: Tue, 24 Nov 2015 01:33:52 -0800
From: tip-bot for Borislav Petkov <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, brgerst@...il.com,
torvalds@...ux-foundation.org, luto@...capital.net,
dvlasenk@...hat.com, peterz@...radead.org, hpa@...or.com,
mingo@...nel.org, bp@...en8.de, tglx@...utronix.de, bp@...e.de,
luto@...nel.org
Subject: [tip:x86/cpu] x86/MSR: Chop off lower 32-bit value
Commit-ID: 679bcea857d72868e3431dde3a0e158bf0ed9119
Gitweb: http://git.kernel.org/tip/679bcea857d72868e3431dde3a0e158bf0ed9119
Author: Borislav Petkov <bp@...e.de>
AuthorDate: Mon, 23 Nov 2015 11:12:26 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 24 Nov 2015 09:15:55 +0100
x86/MSR: Chop off lower 32-bit value
sparse complains that the cast truncates the high bits. But here
we really do know what we're doing and we need the lower 32 bits
only as the @low argument. So make that explicit.
Suggested-by: Andy Lutomirski <luto@...nel.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1448273546-2567-7-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/include/asm/msr.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index 77d8b28..8613382 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -190,7 +190,7 @@ static inline void wrmsr(unsigned msr, unsigned low, unsigned high)
static inline void wrmsrl(unsigned msr, u64 val)
{
- native_write_msr(msr, (u32)val, (u32)(val >> 32));
+ native_write_msr(msr, (u32)(val & 0xffffffffULL), (u32)(val >> 32));
}
/* wrmsr with exception handling */
--
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