[PATCH] RT: Invert some TRACE_BUG_ON_LOCKED tests

From: Tom Rini
Date: Fri Sep 02 2005 - 15:09:29 EST


With 2.6.13-rt4 I had to do the following in order to get my paired down
config booting on my x86 whitebox (defconfig works fine, after I enable
enet/8250_console/nfsroot). Daniel Walker helped me trace this down.

Signed-off-by: Tom Rini <trini@xxxxxxxxxxxxxxxxxxx>

--- linux-2.6.13/kernel/rt.c 2005-09-02 12:39:02.000000000 -0700
+++ linux-2.6.13/kernel/rt.c 2005-09-02 12:24:04.000000000 -0700
@@ -736,8 +736,8 @@
if (old_owner == new_owner)
return;

- TRACE_BUG_ON_LOCKED(!spin_is_locked(&old_owner->task->pi_lock));
- TRACE_BUG_ON_LOCKED(!spin_is_locked(&new_owner->task->pi_lock));
+ TRACE_BUG_ON_LOCKED(spin_is_locked(&old_owner->task->pi_lock));
+ TRACE_BUG_ON_LOCKED(spin_is_locked(&new_owner->task->pi_lock));
plist_for_each_safe(curr1, next1, &old_owner->task->pi_waiters) {
w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);
if (w->lock == lock) {
@@ -770,8 +770,8 @@
return;
}

- TRACE_BUG_ON_LOCKED(!spin_is_locked(&lock->wait_lock));
- TRACE_BUG_ON_LOCKED(!spin_is_locked(&p->pi_lock));
+ TRACE_BUG_ON_LOCKED(spin_is_locked(&lock->wait_lock));
+ TRACE_BUG_ON_LOCKED(spin_is_locked(&p->pi_lock));
#ifdef CONFIG_RT_DEADLOCK_DETECT
pi_prio++;
if (p->policy != SCHED_NORMAL && prio > normal_prio(p)) {
@@ -967,8 +967,8 @@
/*
* Add SCHED_NORMAL tasks to the end of the waitqueue (FIFO):
*/
- TRACE_BUG_ON_LOCKED(!spin_is_locked(&task->pi_lock));
- TRACE_BUG_ON_LOCKED(!spin_is_locked(&lock->wait_lock));
+ TRACE_BUG_ON_LOCKED(spin_is_locked(&task->pi_lock));
+ TRACE_BUG_ON_LOCKED(spin_is_locked(&lock->wait_lock));
#if !ALL_TASKS_PI
if (!rt_task(task)) {
plist_add(&waiter->list, &lock->wait_list);
@@ -1070,7 +1070,7 @@
struct rt_mutex_waiter *waiter = NULL;
struct thread_info *new_owner;

- TRACE_BUG_ON_LOCKED(!spin_is_locked(&lock->wait_lock));
+ TRACE_BUG_ON_LOCKED(spin_is_locked(&lock->wait_lock));
/*
* Get the highest prio one:
*

--
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/