[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.