Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.32-12
From: Steven Rostedt
Date: Fri Dec 10 2004 - 21:27:19 EST
On Fri, 2004-12-10 at 12:11 +0100, Ingo Molnar wrote:
> * Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > Second, my ethernet doesn't work, and it really seems to be some kind
> > of interrupt trouble. It sends out ARPs but doesn't see them come
> > back, and it also doesn't seem to know that it sent them out. I get
> > the following:
> >
<snip>
> > I'll hack on it some more.
>
> yeah, please check this - you are the first one to report this issue.
Hi Ingo, I found the problem! and I now know why John Cooper didn't
have this problem too. I have CONFIG_PCI_MSI defined. I don't know why,
I must have seen the option a while ago and said to myself "That looks
cool, lets try it". Since I started with the config file of the vanilla
kernel with your rt patches, it was still on.
Anyways, what is happening is that the io_apic code is mapping irqs to
vectors, and your code didn't account for it. So here's my patch.
Index: arch/i386/kernel/io_apic.c
===================================================================
--- arch/i386/kernel/io_apic.c (revision 18)
+++ arch/i386/kernel/io_apic.c (working copy)
@@ -1942,12 +1942,14 @@
static void end_level_ioapic_irq(unsigned int irq)
{
+#ifndef CONFIG_PCI_MSI
if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)) &&
irq_desc[irq].action)
+#endif
unmask_IO_APIC_irq(irq);
}
-#else /* !CONFIG_PREEMPT_HARDIRQS || !CONFIG_SMP */
+#else /* !CONFIG_PREEMPT_HARDIRQS */
static void mask_and_ack_level_ioapic_irq(unsigned int irq)
{
@@ -2035,7 +2037,11 @@
{
int irq = vector_to_irq(vector);
- end_level_ioapic_irq(irq);
+#if defined(CONFIG_PREEMPT_HARDIRQS)
+ if (!(irq_desc[vector].status & (IRQ_DISABLED | IRQ_INPROGRESS)) &&
+ irq_desc[vector].action)
+#endif
+ end_level_ioapic_irq(irq);
}
static void enable_level_ioapic_vector(unsigned int vector)
--------------------
I also removed the comment "!CONFIG_SMP" since it really wasn't correct.
So I can get back to looking at other things. This also may explain why
my system would hang with my usb printer attached (the usb interrupts
were vectored too). I'll plug my printer back in and see if it works
now. I'll let you know if I have any more problems.
Thanks,
-- Steve
-
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/