[PATCH RT] - Mellanox IB driver patch

From: Sven-Thorsten Dietrich
Date: Fri Aug 24 2007 - 05:25:42 EST



Hi Ingo,

RT driver patch to eliminate in_atomic stack dump.

The problem code was identified by Michael S. Tsirkin, and he suggested
the fix.

I adapted to use RT's _nort primitives- should work correctly in all
configs.

Thanks,

Sven


Fixes in_atomic stack-dump, when Mellanox module
is loaded into the RT Kernel.

From: Michael S. Tsirkin <mst@xxxxxxxxxxxxxxxxxx>

"Basically, if you just make spin_lock_irqsave (and spin_lock_irq) not disable
interrupts for non-raw spinlocks, I think all of infiniband will be fine without
changes."

signed-off-by: Sven-Thorsten Dietrich <sven@xxxxxxxxxxxxxxxxxxxxx>


Index: linux-2.6.21/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
===================================================================
--- linux-2.6.21.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ linux-2.6.21/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -788,7 +788,7 @@ void ipoib_mcast_restart_task(struct wor

ipoib_mcast_stop_thread(dev, 0);

- local_irq_save(flags);
+ local_irq_save_nort(flags);
netif_tx_lock(dev);
spin_lock(&priv->lock);

@@ -863,7 +863,7 @@ void ipoib_mcast_restart_task(struct wor

spin_unlock(&priv->lock);
netif_tx_unlock(dev);
- local_irq_restore(flags);
+ local_irq_restore_nort(flags);

/* We have to cancel outside of the spinlock */
list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {


-
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/