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

[Xen-devel] [PATCH] PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels.



Hi,

Building PV-on-HVM drivers for RHEL4U2 failed:
  
/ia64/xen-unstable.hg/unmodified_drivers/linux-2.6/platform-pci/../xenbus/xenbus_comms.c:81:
 warning: implicit declaration of function `atomic_cmpxchg'

This patch fixes it.

Best regards,
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1242892488 -32400
# Node ID 21aa4b4ac479051c2b8e5c2582844ec6b5c4fb47
# Parent  145e49b8574c8da3a72932a57c076227d38fee60
PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r 145e49b8574c -r 21aa4b4ac479 
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Tue May 
19 23:44:28 2009 +0100
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Thu May 
21 16:54:48 2009 +0900
@@ -157,4 +157,8 @@ typedef irqreturn_t (*irq_handler_t)(int
 #define setup_xen_features xen_setup_features
 #endif
 
+#ifndef atomic_cmpxchg
+#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
 #endif
+
+#endif
_______________________________________________
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®.