lkml.org 
[lkml]   [2015]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [tip:x86/asm] x86/asm/msr: Make wrmsrl() a function
On Sun, Aug 23, 2015 at 12:23 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> On 08/23/2015 04:45 AM, tip-bot for Andy Lutomirski wrote:
>> Commit-ID: 47edb65178cb7056c2eea0b6c41a7d8c84547192
>> Gitweb: http://git.kernel.org/tip/47edb65178cb7056c2eea0b6c41a7d8c84547192
>> Author: Andy Lutomirski <luto@kernel.org>
>> AuthorDate: Thu, 23 Jul 2015 12:14:40 -0700
>> Committer: Ingo Molnar <mingo@kernel.org>
>> CommitDate: Sun, 23 Aug 2015 13:25:38 +0200
>>
>> x86/asm/msr: Make wrmsrl() a function
>>
>> As of cf991de2f614 ("x86/asm/msr: Make wrmsrl_safe() a
>> function"), wrmsrl_safe is a function, but wrmsrl is still a
>> macro. The wrmsrl macro performs invalid shifts if the value
>> argument is 32 bits. This makes it unnecessarily awkward to
>> write code that puts an unsigned long into an MSR.
>>
>
> Looking at this: where do you see an invalid shift? Everywhere I can
> see we do the proper casting. Still not side effect free, though.

I'm having trouble reproducing it right now, but IIRC at one point I
got wrmsrl to warn that a constant turned into zero as a result of a
shift.

--Andy

>
> -hpa
>



--
Andy Lutomirski
AMA Capital Management, LLC


\
 
 \ /
  Last update: 2015-08-24 20:41    [W:0.043 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site