[openib-general] Compile issue with 2.6.12 + realtime preemt patch
Roland Dreier
rolandd at cisco.com
Wed Jul 27 13:29:47 PDT 2005
Steve> Hi, I would like to use the OpenIb drivers with a 2.6.12
Steve> kernel with the realtime-preemt patch maintained by Ingo
Steve> Molnar. I get the following error in sdp_conn.c using svn
Steve> 2909:
Steve> line 49: error: SPIN_LOCK_UNLOCKED undeclared in this
Steve> function
Steve> Has anybody out there got this working or could give me
Steve> clue how to fix it?
Change
static spinlock_t psn_lock = SPIN_LOCK_UNLOCKED;
to
static DEFINE_SPINLOCK(psn_lock);
Libor, we might as well make this change:
Initialize spinlock with DEFINE_SPINLOCK() instead of
SPIN_LOCK_UNLOCKED to be friendly to CONFIG_PREEMPT_RT patches.
Signed-off-by: Roland Dreier <rolandd at cisco.com>
--- infiniband/ulp/sdp/sdp_conn.c (revision 2904)
+++ infiniband/ulp/sdp/sdp_conn.c (working copy)
@@ -46,7 +46,7 @@ static struct ib_client sdp_client = {
.remove = sdp_device_remove_one
};
-static spinlock_t psn_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(psn_lock);
static u32 psn_seed;
/*
More information about the general
mailing list