Skip to contentSkip to conversation

2.6.13-rc7-rt3 compile fix

PATCH K.R. Foley 2 participants 4 messages Aug 26, 2005

lore
Share & tools
lore

K.R. Foley

author
#0 lore raw

2.6.13-rc7-rt3 won't compile without the simple patch below.

Signature · 1 line
   kr
kernel/rt.c renamed from kernel/rt.c.orig +2 -2
@@ -672,7 +672,7 @@
 	struct rt_mutex_waiter *w;
 	struct plist *curr1;
 
-	__raw_spin_lock(old_owner->task->pi_lock);
+	__raw_spin_lock(&old_owner->task->pi_lock);
 	TRACE_WARN_ON_LOCKED(plist_empty(&waiter->pi_list));
 	TRACE_WARN_ON_LOCKED(lock_owner(lock));
 
@@ -683,7 +683,7 @@
 	}
 	TRACE_WARN_ON_LOCKED(1);
 ok:
-	__raw_spin_unlock(old_owner->task->pi_lock);
+	__raw_spin_unlock(&old_owner->task->pi_lock);
 	return;
 }
 
#1 lore raw
Quoted 2 lines · K.R. Foley

2.6.13-rc7-rt3 won't compile without the simple patch below.

- __raw_spin_lock(old_owner->task->pi_lock);

+       __raw_spin_lock(&old_owner->task->pi_lock);
        TRACE_WARN_ON_LOCKED(plist_empty(&waiter->pi_list));
        TRACE_WARN_ON_LOCKED(lock_owner(lock));

@@ -683,7 +683,7 @@

        }
        TRACE_WARN_ON_LOCKED(1);
 ok:
-       __raw_spin_unlock(old_owner->task->pi_lock);
+       __raw_spin_unlock(&old_owner->task->pi_lock);
        return;

Oops! my bad. I saw that needed locking, but I didn't have the tracing on (I was trying for internal deadlocks), so that part of the code wasn't compiling. If you turn off tracing it would compile :-)

Anyway, the next time I modify code that's protected by ifdefs, I'll change my config and see at least the code compiles.

Thanks,

-- Steve

author
#2 lore raw
Quoted 19 lines · Steven Rostedt
Quoted 2 lines · K.R. Foley

2.6.13-rc7-rt3 won't compile without the simple patch below.

kernel/rt.c renamed from kernel/rt.c.orig +2 -2
-       __raw_spin_lock(old_owner->task->pi_lock);
+       __raw_spin_lock(&old_owner->task->pi_lock);
        TRACE_WARN_ON_LOCKED(plist_empty(&waiter->pi_list));
        TRACE_WARN_ON_LOCKED(lock_owner(lock));
@@ -683,7 +683,7 @@
        }
        TRACE_WARN_ON_LOCKED(1);
 ok:
-       __raw_spin_unlock(old_owner->task->pi_lock);
+       __raw_spin_unlock(&old_owner->task->pi_lock);
        return;
 
 
Quoted 3 lines

Oops! my bad. I saw that needed locking, but I didn't have the tracing on (I was trying for internal deadlocks), so that part of the code wasn't compiling. If you turn off tracing it would compile :-)

Understood. ;-)

Quoted 10 lines

Anyway, the next time I modify code that's protected by ifdefs, I'll change my config and see at least the code compiles.

Thanks,

-- Steve

Signature · 1 line
   kr
#3 lore raw
Quoted 7 lines · K.R. Foley
Quoted 3 lines · Steven Rostedt

Oops! my bad. I saw that needed locking, but I didn't have the tracing on (I was trying for internal deadlocks), so that part of the code wasn't compiling. If you turn off tracing it would compile :-)

Understood. ;-)

I'm wrong again :-) It wasn't the tracing. Here's the ifdef

#if defined(ALL_TASKS_PI) && defined(CONFIG_RT_DEADLOCK_DETECT)

And Ingo turned on ALL_TASKS_PI now. But I had
CONFIG_RT_DEADLOCK_DETECT also turned off.

-- Steve