From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume Rousse Subject: Re: linux-2.6.18-xen.hg compilation issue with gcc 4.3 Date: Wed, 21 May 2008 17:48:57 +0200 Message-ID: <48344469.7040705@inria.fr> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000709030907000303040802" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------000709030907000303040802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Keir Fraser a écrit : > > > On 21/5/08 16:22, "Guillaume Rousse" wrote: > >>>> However, I couldn't find any loop susceptible to be wrongly optimised in >>>> incriminated code (sync_xen_wallclock in arch/i386/kernel/time-xen.c). >>>> Any hint welcome. >>> It's hidden in the __normalize_time() macro. Could you backport Jeremy's >>> upstream fix to the 2.6.18 kernel? >> Ok, it works. Thanks. > > Could you post the patch so we can check it in? With a signed-off-by line? here it is. -- Guillaume Rousse Moyens Informatiques - INRIA Futurs Tel: 01 69 35 69 62 --------------000709030907000303040802 Content-Type: text/plain; name="xen-3.2.0-gcc4.3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-3.2.0-gcc4.3.patch" Signed-off-by: Guillaume Rousse diff -Naur --exclude '*~' linux-2.6.18-xen.hg/arch/i386/kernel/time-xen.c linux-2.6.18-xen.hg-gcc.4.3/arch/i386/kernel/time-xen.c --- linux-2.6.18-xen.hg/arch/i386/kernel/time-xen.c 2008-02-06 22:18:37.000000000 +0100 +++ linux-2.6.18-xen.hg-gcc.4.3/arch/i386/kernel/time-xen.c 2008-05-21 16:23:42.000000000 +0200 @@ -140,10 +140,12 @@ static inline void __normalize_time(time_t *sec, s64 *nsec) { while (*nsec >= NSEC_PER_SEC) { + asm("" : "+r"(*nsec)); (*nsec) -= NSEC_PER_SEC; (*sec)++; } while (*nsec < 0) { + asm("" : "+r"(*nsec)); (*nsec) += NSEC_PER_SEC; (*sec)--; } --------------000709030907000303040802 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------000709030907000303040802--