From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH 7/24] consolidate msr.h Date: Tue, 20 Nov 2007 21:43:12 +1100 Message-ID: <200711202143.13460.rusty@rustcorp.com.au> References: <11946337851964-git-send-email-gcosta@redhat.com> <20071120055113.GC20436@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: lguest-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, jun.nakajima-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Bastian Blank , tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org, anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org, Ingo Molnar , Glauber de Oliveira Costa , virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, ak-l3A5Bk7waGM@public.gmane.org To: Steven Rostedt Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: lguest-bounces+glkvl-lguest=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: lguest-bounces+glkvl-lguest=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org List-Id: kvm.vger.kernel.org On Tuesday 20 November 2007 17:16:45 Steven Rostedt wrote: > On Tue, 20 Nov 2007, Ingo Molnar wrote: > > i dont think there's ever any true need (and good cause) to force > > integer type casts like that at the callee site. > > Unless you mean we should do something like this: > > static inline void __wrmsrl(unsigned int msr, unsigned long long val); > #define wrmsr(msr, val) __wrmsrl(msr, (unsigned long long)var) Heh: union ptr_or_val { void *ptr; unsigned long long val; }; static inline void __wrmsrl(unsigned int msr, union ptr_or_val pv); #define wrmsr(msr, v) __wrmsrl(msr, (union ptr_or_val)v) Ok, maybe not... Rusty.