[ewg] [PATCH] backports: OFED 1.4.2 rds fix for double-def of assert_spin_locked in RHEL4_U4/5/6/7
Jack Morgenstein
jackm at dev.mellanox.co.il
Tue Jul 28 01:13:39 PDT 2009
rds backport: fix for double-def of assert_spin_locked in RHEL4_U4/5/6/7
Any RHEL 4 infiniband app which includes jbd.h will get a compilation
error of double-definition of macro assert_spin_locked.
This fix was suggested by Brian Murrell of Sun.
This fixes bugzilla 1655.
Signed_off_by: Jack Morgenstein <jackm at dev.mellanox.co.il>
---
Andy,
There is a requirement for Lustre to fix bug 1655 in ofed 1.4.2.
https://bugs.openfabrics.org/show_bug.cgi?id=1655
In keeping with Brian Murrell's suggestion in comment #5
(to move the assert_spin_locked definition out of the spinlock.h
backport addons (for RHEL U4,5,6,7) and put it closer to the
C code that actually uses it), I propose moving the assert_spin_locked
definition from the spinlock.h addons files to file net/rds/rdma.h
(just after including rds.h) (done via an addition to patch file rds_to_2_6_9.patch).
The patch is below.
PLEASE VERIFY AND OK THIS PATCH ASAP, so that I may check it in to the OFED 1.4.2
git before release. (I have checked only compilation on RHEL_U4/7 on X86_64).
Thanks!
diff --git a/kernel_addons/backport/2.6.9_U4/include/linux/spinlock.h b/kernel_addons/backport/2.6.9_U4/include/linux/spinlock.h
index 0d24ba3..8b2b892 100644
--- a/kernel_addons/backport/2.6.9_U4/include/linux/spinlock.h
+++ b/kernel_addons/backport/2.6.9_U4/include/linux/spinlock.h
@@ -6,6 +6,4 @@
#define spin_lock_nested(lock, subclass) spin_lock(lock)
-#define assert_spin_locked(lock) do { (void)(lock); } while(0)
-
#endif
diff --git a/kernel_addons/backport/2.6.9_U5/include/linux/spinlock.h b/kernel_addons/backport/2.6.9_U5/include/linux/spinlock.h
index 0d24ba3..8b2b892 100644
--- a/kernel_addons/backport/2.6.9_U5/include/linux/spinlock.h
+++ b/kernel_addons/backport/2.6.9_U5/include/linux/spinlock.h
@@ -6,6 +6,4 @@
#define spin_lock_nested(lock, subclass) spin_lock(lock)
-#define assert_spin_locked(lock) do { (void)(lock); } while(0)
-
#endif
diff --git a/kernel_addons/backport/2.6.9_U6/include/linux/spinlock.h b/kernel_addons/backport/2.6.9_U6/include/linux/spinlock.h
index 665f011..4e22280 100644
--- a/kernel_addons/backport/2.6.9_U6/include/linux/spinlock.h
+++ b/kernel_addons/backport/2.6.9_U6/include/linux/spinlock.h
@@ -5,6 +5,4 @@
#define spin_lock_nested(lock, subclass) spin_lock(lock)
-#define assert_spin_locked(lock) do { (void)(lock); } while(0)
-
#endif
diff --git a/kernel_addons/backport/2.6.9_U7/include/linux/spinlock.h b/kernel_addons/backport/2.6.9_U7/include/linux/spinlock.h
index 665f011..4e22280 100644
--- a/kernel_addons/backport/2.6.9_U7/include/linux/spinlock.h
+++ b/kernel_addons/backport/2.6.9_U7/include/linux/spinlock.h
@@ -5,6 +5,4 @@
#define spin_lock_nested(lock, subclass) spin_lock(lock)
-#define assert_spin_locked(lock) do { (void)(lock); } while(0)
-
#endif
diff --git a/kernel_patches/backport/2.6.9_U4/rds_to_2_6_9.patch b/kernel_patches/backport/2.6.9_U4/rds_to_2_6_9.patch
index d3e2cb9..e260242 100644
--- a/kernel_patches/backport/2.6.9_U4/rds_to_2_6_9.patch
+++ b/kernel_patches/backport/2.6.9_U4/rds_to_2_6_9.patch
@@ -32,3 +32,18 @@ Index: ofed_kernel/net/rds/rds.h
#ifdef ATOMIC64_INIT
#define KERNEL_HAS_ATOMIC64
+diff --git a/net/rds/rdma.h b/net/rds/rdma.h
+index 4255120..8c35e7f 100644
+--- a/net/rds/rdma.h
++++ b/net/rds/rdma.h
+@@ -7,6 +7,10 @@
+
+ #include "rds.h"
+
++#ifndef assert_spin_locked
++#define assert_spin_locked(lock) do { (void)(lock); } while(0)
++#endif
++
+ struct rds_mr {
+ struct rb_node r_rb_node;
+ atomic_t r_refcount;
diff --git a/kernel_patches/backport/2.6.9_U5/rds_to_2_6_9.patch b/kernel_patches/backport/2.6.9_U5/rds_to_2_6_9.patch
index d3e2cb9..e260242 100644
--- a/kernel_patches/backport/2.6.9_U5/rds_to_2_6_9.patch
+++ b/kernel_patches/backport/2.6.9_U5/rds_to_2_6_9.patch
@@ -32,3 +32,18 @@ Index: ofed_kernel/net/rds/rds.h
#ifdef ATOMIC64_INIT
#define KERNEL_HAS_ATOMIC64
+diff --git a/net/rds/rdma.h b/net/rds/rdma.h
+index 4255120..8c35e7f 100644
+--- a/net/rds/rdma.h
++++ b/net/rds/rdma.h
+@@ -7,6 +7,10 @@
+
+ #include "rds.h"
+
++#ifndef assert_spin_locked
++#define assert_spin_locked(lock) do { (void)(lock); } while(0)
++#endif
++
+ struct rds_mr {
+ struct rb_node r_rb_node;
+ atomic_t r_refcount;
diff --git a/kernel_patches/backport/2.6.9_U6/rds_to_2_6_9.patch b/kernel_patches/backport/2.6.9_U6/rds_to_2_6_9.patch
index d3e2cb9..e260242 100644
--- a/kernel_patches/backport/2.6.9_U6/rds_to_2_6_9.patch
+++ b/kernel_patches/backport/2.6.9_U6/rds_to_2_6_9.patch
@@ -32,3 +32,18 @@ Index: ofed_kernel/net/rds/rds.h
#ifdef ATOMIC64_INIT
#define KERNEL_HAS_ATOMIC64
+diff --git a/net/rds/rdma.h b/net/rds/rdma.h
+index 4255120..8c35e7f 100644
+--- a/net/rds/rdma.h
++++ b/net/rds/rdma.h
+@@ -7,6 +7,10 @@
+
+ #include "rds.h"
+
++#ifndef assert_spin_locked
++#define assert_spin_locked(lock) do { (void)(lock); } while(0)
++#endif
++
+ struct rds_mr {
+ struct rb_node r_rb_node;
+ atomic_t r_refcount;
diff --git a/kernel_patches/backport/2.6.9_U7/rds_to_2_6_9.patch b/kernel_patches/backport/2.6.9_U7/rds_to_2_6_9.patch
index d3e2cb9..e260242 100644
--- a/kernel_patches/backport/2.6.9_U7/rds_to_2_6_9.patch
+++ b/kernel_patches/backport/2.6.9_U7/rds_to_2_6_9.patch
@@ -32,3 +32,18 @@ Index: ofed_kernel/net/rds/rds.h
#ifdef ATOMIC64_INIT
#define KERNEL_HAS_ATOMIC64
+diff --git a/net/rds/rdma.h b/net/rds/rdma.h
+index 4255120..8c35e7f 100644
+--- a/net/rds/rdma.h
++++ b/net/rds/rdma.h
+@@ -7,6 +7,10 @@
+
+ #include "rds.h"
+
++#ifndef assert_spin_locked
++#define assert_spin_locked(lock) do { (void)(lock); } while(0)
++#endif
++
+ struct rds_mr {
+ struct rb_node r_rb_node;
+ atomic_t r_refcount;
More information about the ewg
mailing list