[ewg] Fix for compiling OFED-1.4 for Redhat 4 on Itanium

Aleksey Senin alekseys at voltaire.com
Sun Nov 2 03:47:30 PST 2008


This patch fix compiling error when compiling ofa-kernel for RedHat 4
update 4/5/6 on Itanium platform.

It based on the patch applied about month ago for RH4U7.


Index: ofa_kernel-1.4/kernel_addons/backport/2.6.9_U4/include/asm-ia64/atomic.h
===================================================================
--- ofa_kernel-1.4.orig/kernel_addons/backport/2.6.9_U4/include/asm-ia64/atomic.h
+++ ofa_kernel-1.4/kernel_addons/backport/2.6.9_U4/include/asm-ia64/atomic.h
@@ -15,19 +15,5 @@
 		: ia64_atomic64_add(__ia64_aar_i, v);			\
 })
 
-static __inline__ int
-ia64_atomic64_add (__s64 i, atomic64_t *v)
-{
-	__s64 old, new;
-	CMPXCHG_BUGCHECK_DECL
-
-	do {
-		CMPXCHG_BUGCHECK(v);
-		old = atomic64_read(v);
-		new = old + i;
-	} while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
-	return new;
-}
-
 #include <asm-generic/atomic.h>
 #endif /* __BACKPORT_ASM_IA64_ATOMIC_H */
Index: ofa_kernel-1.4/kernel_addons/backport/2.6.9_U5/include/asm-ia64/atomic.h
===================================================================
--- ofa_kernel-1.4.orig/kernel_addons/backport/2.6.9_U5/include/asm-ia64/atomic.h
+++ ofa_kernel-1.4/kernel_addons/backport/2.6.9_U5/include/asm-ia64/atomic.h
@@ -15,19 +15,5 @@
 		: ia64_atomic64_add(__ia64_aar_i, v);			\
 })
 
-static __inline__ int
-ia64_atomic64_add (__s64 i, atomic64_t *v)
-{
-	__s64 old, new;
-	CMPXCHG_BUGCHECK_DECL
-
-	do {
-		CMPXCHG_BUGCHECK(v);
-		old = atomic64_read(v);
-		new = old + i;
-	} while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
-	return new;
-}
-
 #include <asm-generic/atomic.h>
 #endif /* __BACKPORT_ASM_IA64_ATOMIC_H */
Index: ofa_kernel-1.4/kernel_addons/backport/2.6.9_U6/include/asm-ia64/atomic.h
===================================================================
--- ofa_kernel-1.4.orig/kernel_addons/backport/2.6.9_U6/include/asm-ia64/atomic.h
+++ ofa_kernel-1.4/kernel_addons/backport/2.6.9_U6/include/asm-ia64/atomic.h
@@ -15,19 +15,5 @@
 		: ia64_atomic64_add(__ia64_aar_i, v);			\
 })
 
-static __inline__ int
-ia64_atomic64_add (__s64 i, atomic64_t *v)
-{
-	__s64 old, new;
-	CMPXCHG_BUGCHECK_DECL
-
-	do {
-		CMPXCHG_BUGCHECK(v);
-		old = atomic64_read(v);
-		new = old + i;
-	} while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
-	return new;
-}
-
 #include <asm-generic/atomic.h>
 #endif /* __BACKPORT_ASM_IA64_ATOMIC_H */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rh4-ia64-compile.diff
Type: text/x-patch
Size: 2271 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ewg/attachments/20081102/b882104b/attachment.bin>


More information about the ewg mailing list