Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8

From: Ingo Molnar
Date: Wed Oct 20 2004 - 07:16:46 EST



* Michal Schmidt <xschmi00@xxxxxxxxxxxxxxxxxx> wrote:

> Ingo Molnar wrote:
> >* Michal Schmidt <xschmi00@xxxxxxxxxxxxxxxxxx> 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.

disable_irq() should work fine though. (it doesnt disable local
interrupts, it only disables that particular irq line.) So something
else disabled interrupts - ah, netconsole.c itself. Does the patch below
fix things up for you?

Ingo

--- linux/drivers/net/netconsole.c.orig
+++ linux/drivers/net/netconsole.c
@@ -73,7 +73,9 @@ static void write_msg(struct console *co
if (!np.dev)
return;

+#ifndef CONFIG_PREEMPT_REALTIME
local_irq_save(flags);
+#endif

for(left = len; left; ) {
frag = min(left, MAX_PRINT_CHUNK);
@@ -82,7 +84,9 @@ static void write_msg(struct console *co
left -= frag;
}

+#ifndef CONFIG_PREEMPT_REALTIME
local_irq_restore(flags);
+#endif
}

static struct console netconsole = {
-
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/