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-changelog

[Xen-changelog] [xen-unstable] x86_32: Fix _raw_read_trylock() build on

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86_32: Fix _raw_read_trylock() build on some gcc versions.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 30 Mar 2011 21:50:15 +0100
Delivery-date: Wed, 30 Mar 2011 13:52:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1301214635 -3600
# Node ID 0bc1c4746c8939337f693a513fd837fc03477db1
# Parent  48dac730a93b27ff60a340564e9a7afd7f9385f4
x86_32: Fix _raw_read_trylock() build on some gcc versions.

Was broken by 23099:612171ff82ea.

A bool_t is a single byte, and needs a 'q' register constraint. Avoid
the whole issue by changing the variable to an int, and explicitly
specify the operand suffix as 'l' for good measure.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 48dac730a93b -r 0bc1c4746c89 xen/include/asm-x86/spinlock.h
--- a/xen/include/asm-x86/spinlock.h    Sat Mar 26 09:42:01 2011 +0000
+++ b/xen/include/asm-x86/spinlock.h    Sun Mar 27 09:30:35 2011 +0100
@@ -40,14 +40,14 @@
 
 static always_inline int _raw_read_trylock(raw_rwlock_t *rw)
 {
-    bool_t acquired;
+    int acquired;
 
     asm volatile (
         "    lock; decl %0         \n"
         "    jns 2f                \n"
         "1:  .subsection 1         \n"
         "2:  lock; incl %0         \n"
-        "    dec %1                \n"
+        "    decl %1               \n"
         "    jmp 1b                \n"
         "    .subsection 0         \n"
         : "=m" (rw->lock), "=r" (acquired) : "1" (1) : "memory" );

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86_32: Fix _raw_read_trylock() build on some gcc versions., Xen patchbot-unstable <=