mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-07 14:24:18 +08:00
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@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1448273546-2567-7-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
31ac34ca56
commit
679bcea857
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user