From: "KUWAMURA Shin'ya" Subject: [PATCH] PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels. Date: Fri, 22 May 2009 14:28:30 +0900 (JST) Message-ID: <20090522.142830.135961481.kuwa@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_May_22_14_28_30_2009_024)--" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ----Next_Part(Fri_May_22_14_28_30_2009_024)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ----Next_Part(Fri_May_22_14_28_30_2009_024)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="add-atomic_cmpxchg.patch" # HG changeset patch # User KUWAMURA Shin'ya # Date 1242892488 -32400 # Node ID 21aa4b4ac479051c2b8e5c2582844ec6b5c4fb47 # Parent 145e49b8574c8da3a72932a57c076227d38fee60 PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels. Signed-off-by: KUWAMURA Shin'ya 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 ----Next_Part(Fri_May_22_14_28_30_2009_024)-- Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ----Next_Part(Fri_May_22_14_28_30_2009_024)----