Re: i386 IPI handlers running with hardirq_count == 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andi Kleen (on 29 Jun 2006 13:25:38 +0200) wrote:
>Andrew Morton <[email protected]> writes:
>
>> On Thu, 29 Jun 2006 19:01:17 +1000
>> Keith Owens <[email protected]> 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?
>
>They have to because if there was another interrupt it would execute
>IRET and then clear the NMI flag in the hardware and allow nested NMIs 
>which would cause all sorts of problems.
>
>The only reason to change it would be complex callbacks in the
>current handlers using notifier chains. Maybe if they're that complex they 
>should become simpler? 

My question has nothing to do with NMI.  I am querying inconsistent
behaviour amongst normal IPIs, this list :-

i386 function                   irq_enter?
smp_apic_timer_interrupt           yes
smp_call_function_interrupt        yes
smp_error_interrupt                yes
smp_invalidate_interrupt           no - why
smp_reschedule_interrupt           no (does not need it)
smp_spurious_interrupt             yes
smp_thermal_interrupt              yes

x86_64 function                 irq_enter?
mce_threshold_interrupt            yes
smp_apic_timer_interrupt           yes
smp_call_function_interrupt        yes
smp_error_interrupt                yes
smp_invalidate_interrupt           no - why
smp_reschedule_interrupt           no (does not need it)
smp_spurious_interrupt             yes
smp_thermal_interrupt              yes

That is just the mach-default list, I have not checked the platforms
like voyager.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux