From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Knorr Subject: Re: [request for review] cmpxchg8b asm stuff Date: Tue, 19 Apr 2005 21:39:59 +0200 Message-ID: <20050419193958.GA21651@bytesex> References: <20050419135041.GA19002@bytesex> <1113925602.8217.3.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1113925602.8217.3.camel@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Hollis Blanchard Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > > +++ xen/arch/x86/mm.c 2005-04-19 15:29:01.000000000 +0200 > > > > +static inline int cmpxchg8b_user(u64 *ptr, u64 oval, u64 nval) > Shouldn't this go into include/asm-x86/system.h? Well, maybe later. I want to have it working correctly first, then optimize and then check how to integrate that nicely. > You can add another case to the __i386__ cmpxchg_user switch. That would be the most obvious place, yes. Not fully sure yet that this is really a good idea though as it is sort-of special case for 64bit data on a 32bit machine, you have to split the 64bit values into two 32bit regs and so on (unlike the 64bit version on x86_64 which simply uses the 64bit registers). Maybe it's better to keep that separate as it might be easier to optimize it then, not evaluated yet. Gerd -- #define printk(args...) fprintf(stderr, ## args)