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

Re: [Xen-devel] [PATCH 3/7] Arm/atomic: correct asm() constraints in build_add_sized()



Hi Jan,

On 11/03/2019 16:49, Jan Beulich wrote:
The memory operand is an in/out one, and the auxiliary register gets
written to early.

Take the opportunity and also drop the redundant cast (the inline
functions' parameters are already of the casted-to type).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

I guess this is candidate for backporting.

Reviewed-by: Julien Grall <julien.grall@xxxxxxx>

Cheers,


--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -30,7 +30,7 @@ static inline void name(volatile type *a
      asm volatile("ldr" size " %"width"1,%0\n"                           \
                   "add %"width"1,%"width"1,%"width"2\n"                  \
                   "str" size " %"width"1,%0"                             \
-                 : "=m" (*(volatile type *)addr), "=r" (t)              \
+                 : "+m" (*addr), "=&r" (t)                              \
                   : reg (val));                                          \
  }


--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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