lkml.org 
[lkml]   [2004]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
Ingo Molnar wrote:
> * Michal Schmidt <xschmi00@stud.feec.vutbr.cz> wrote:
>>I'm getting these BUGs when I use netconsole with Real-Time Preemption
>>(but netconsole works):
>
>
> you are getting them because interrupts get disabled somewhere in the
> path. Do your changes perhaps introduce a local_irq_save() or
> local_irq_disable()?
>

I'm attaching my sk98lin patch. It uses disable_irq(). It's inspired by
8139too.

> (in PREEMPT_REALTIME spin_lock_irq*() does not disable interrupts for
> mutex-based spinlocks, so the only way to get irqs disabled is
> explicitly.)
>
> Ingo

Michal
diff -Nurp linux-2.6.9/drivers/net/sk98lin/skge.c linux-2.6.9-mich/drivers/net/sk98lin/skge.c
--- linux-2.6.9/drivers/net/sk98lin/skge.c 2004-10-18 23:53:22.000000000 +0200
+++ linux-2.6.9-mich/drivers/net/sk98lin/skge.c 2004-10-20 01:09:07.566181320 +0200
@@ -1126,6 +1126,21 @@ SK_U32 IntSrc; /* interrupts source re
return SkIsrRetHandled;
} /* SkGeIsrOnePort */

+#ifdef CONFIG_NET_POLL_CONTROLLER
+/**
+ * SkGePollController - polling receive, for netconsole
+ * @dev: network device
+ *
+ * Polling receive - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ */
+static void SkGePollController(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ SkGeIsr(dev->irq, dev, NULL);
+ enable_irq(dev->irq);
+}
+#endif

/****************************************************************************
*
@@ -4960,6 +4975,9 @@ static int __devinit skge_probe_one(stru
dev->set_mac_address = &SkGeSetMacAddr;
dev->do_ioctl = &SkGeIoctl;
dev->change_mtu = &SkGeChangeMtu;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = &SkGePollController;
+#endif
dev->flags &= ~IFF_RUNNING;
SET_NETDEV_DEV(dev, &pdev->dev);
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:1.119 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site