Re: "No irq handler for vector" problem

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

 



On Mon, 25 Jun 2019, Hodaszi, Robert wrote:
Actually, I tried to print IO-APIC's IRR at the end of mask_ioapic_irq() on Friday, and it always showed 0. I did that again. Here's the patch, and debug output:

   diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
   index 53aa234a68..b0f655c61f 100644
   --- a/arch/x86/kernel/apic/io_apic.c
   +++ b/arch/x86/kernel/apic/io_apic.c
   @@ -472,6 +472,17 @@ static void mask_ioapic_irq(struct irq_data *irq_data)

            raw_spin_lock_irqsave(&ioapic_lock, flags);
            io_apic_modify_irq(data, ~0, IO_APIC_REDIR_MASKED, &io_apic_sync);
   +
   +       {
   +               struct irq_pin_list *entry;
   +
   +               for_each_irq_pin(entry, data->irq_2_pin) {
   +                       struct IO_APIC_route_entry re;
   +                       re = __ioapic_read_entry(entry->apic, entry->pin);
   +                       printk("%d -> %x\n", entry->pin, re.irr);
   +               }
   +       }
   +
            raw_spin_unlock_irqrestore(&ioapic_lock, flags);
     }


   # dmesg -c >/dev/null; taskset 1 cat /dev/ttyS1 & >/dev/null ;
   PID=$!; usleep 100000; kill $PID; dmesg -c
   <4>3 -> 0
   <0>do_IRQ: 1.44 No irq handler for vector
   [1]+  Terminated                 taskset 1 cat /dev/ttyS1


So I assume, only the local APIC has info about the pending IRQ. But as free_irq() is running on CPU#0 and the IRQ is pending on CPU#1, CPU#0 cannot read CPU#1's local APIC, right? Or maybe I'm missing something?

Robert

I just tried your patch, and same issue. It correlates to my previous findings:

# /opt/test3.sh ; trace-cmd report
  plugin 'function'
do_IRQ: 1.44 No irq handler for vector
CPU0 data recorded at offset=0x363000
    4096 bytes in size
CPU1 data recorded at offset=0x364000
    4096 bytes in size
CPU2 data recorded at offset=0x365000
    0 bytes in size
CPU3 data recorded at offset=0x365000
    0 bytes in size
CPU 2 is empty
CPU 3 is empty
cpus=4
             cat-3825  [000]   683.390815: function:             mask_ioapic_irq <-- mask_irq.part.33
             cat-3825  [000]   683.390823: function:             ioapic_sync_irq <-- __free_irq
             cat-3825  [000]   683.390824: function:             __ioapic_read_entry <-- ioapic_sync_irq
             cat-3825  [000]   683.390826: function:             synchronize_hardirq <-- __free_irq
             cat-3825  [000]   683.390829: function:             x86_vector_deactivate <-- __irq_domain_deactivate_irq
             cat-3825  [000]   683.390829: function:             clear_irq_vector <-- x86_vector_deactivate
             cat-3825  [000]   683.390830: function:             reserve_irq_vector_locked <-- x86_vector_deactivate
          <idle>-0     [001]   683.390895: function:             do_IRQ <-- ret_from_intr
Robert




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux