WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] linux-2.6.18-xen.hg compilation issue with gcc 4.3

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] linux-2.6.18-xen.hg compilation issue with gcc 4.3
From: Guillaume Rousse <Guillaume.Rousse@xxxxxxxx>
Date: Wed, 21 May 2008 17:48:57 +0200
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 21 May 2008 08:49:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C45A022A.210EF%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C45A022A.210EF%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080504)
Keir Fraser a écrit :


On 21/5/08 16:22, "Guillaume Rousse" <Guillaume.Rousse@xxxxxxxx> 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
Signed-off-by: Guillaume Rousse <Guillaume.Rousse@xxxxxxxx>

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)--;
        }
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel