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

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels.
From: "KUWAMURA Shin'ya" <kuwa@xxxxxxxxxxxxxx>
Date: Fri, 22 May 2009 14:28:30 +0900 (JST)
Delivery-date: Thu, 21 May 2009 22:29:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels., KUWAMURA Shin'ya <=