Re: i386 IPI handlers running with hardirq_count == 0

From: Keith Owens
Date: Thu Jun 29 2006 - 12:39:15 EST


Andrew Morton (on Thu, 29 Jun 2006 02:18:00 -0700) wrote:
>On Thu, 29 Jun 2006 19:01:17 +1000
>Keith Owens <kaos@xxxxxxxxxx> wrote:
>
>> Macro arch/i386/kernel/entry.S::BUILD_INTERRUPT generates the code to
>> handle an IPI and call the corresponding smp_<name> C code.
>> BUILD_INTERRUPT does not update the hardirq_count for the interrupted
>> task, that is left to the C code. Some of the C IPI handlers do not
>> call irq_enter(), so they are running in IRQ context but the
>> hardirq_count field does not reflect this. For example,
>> smp_invalidate_interrupt does not set the hardirq count.
>>
>> What is the best fix, change BUILD_INTERRUPT to adjust the hardirq
>> count or audit all the C handlers to ensure that they call irq_enter()?
>>
>
>The IPI handlers run with IRQs disabled. Do we need a fix?

Some IPI handlers issue irq_enter() to bump hard_irq_count, some IPI
handlers do not. It is inconsistent, with no obvious reason for doing
it either way. All the external irqs go via do_IRQ which does issue
irq_enter(). I guess that my real question is why are some IPIs not
using irq_enter()? The lack of consistency concerns me.

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