From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction abstraction Date: Fri, 20 Jun 2008 13:22:22 -0700 Message-ID: <485C117E.8070706@goop.org> References: <4859AA47.2020903@goop.org> <20080619115832.GM15228@elte.hu> <20080619164708.GA32190@elte.hu> <20080620101028.GA23664@elte.hu> <485BFFC4.3070902@goop.org> <20080620195620.GA20183@elte.hu> <485C1000.8020806@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <485C1000.8020806@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Linus Torvalds Cc: xen-devel , Peter Zijlstra , kvm-devel , benh@kernel.crashing.org, x86@kernel.org, LKML , Virtualization Mailing List , Hugh Dickins , Ingo Molnar , Thomas Gleixner List-Id: virtualization@lists.linuxfoundation.org Jeremy Fitzhardinge wrote: > Linus Torvalds wrote: > >> On Fri, 20 Jun 2008, Ingo Molnar wrote: >> >> >>> okay - Jeremy, could you try the fix below? (or tip/master, i just >>> pushed this out) >>> >>> >> Actually, don't try that one. >> >> It needs to be a _byte_ registers, so "ir" was wrong. You need "iq". >> >> > > Doesn't work, unfortunately: > {standard input}:20511: Error: Incorrect register `%eax' used with `b' > suffix > > lock; orb %eax,1(%rdi) # tmp64, > This does work: asm volatile(LOCK_PREFIX "orb %1,%0" : CONST_MASK_ADDR(nr, addr) : "iq" ((u8)CONST_MASK(nr)) : "memory"); (ie, explicitly casting the mask to u8) J