From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753087AbbHWTZ2 (ORCPT ); Sun, 23 Aug 2015 15:25:28 -0400 Received: from terminus.zytor.com ([198.137.202.10]:48525 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752573AbbHWTZ0 (ORCPT ); Sun, 23 Aug 2015 15:25:26 -0400 Message-ID: <55DA1DCE.60401@zytor.com> Date: Sun, 23 Aug 2015 12:23:58 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, luto@amacapital.net, peterz@infradead.org, w@1wt.eu, mingo@kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, bp@alien8.de, dvlasenk@redhat.com, brgerst@gmail.com, luto@kernel.org, rostedt@goodmis.org, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/asm] x86/asm/msr: Make wrmsrl() a function References: <690f0c629a1085d054e2d1ef3da073cfb3f7db92.1437678821.git.luto@kernel.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > AuthorDate: Thu, 23 Jul 2015 12:14:40 -0700 > Committer: Ingo Molnar > 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. -hpa