• Torben Mathiasen's avatar
    [PATCH] PCI Hotplug: Patch to get cpqphp working with IOAPIC · 07c9872e
    Torben Mathiasen authored
    On Fri, Feb 13 2004, Sy, Dely L wrote:
    > Since filling out the INTERRUPT_LINE is needed for systems running
    > with legacy irqs and not needed for systems running with IO-APIC.  The
    
    > possible
    > solutions:
    > 1) Best is there is a run-time check (a flag or an API call) that tells
    >    whether the system is running on legacy mode or IO-APIC mode. Is there
    >    such check that you know of?
    
    Dan suggested that we look at what IRQ the hotplug controller has been
    assigned in the MPS table. If its < 0x10 we're in legacy/mapped mode.
    That would probaly work
    
    > > >
    > > > Do those servers work on 2.6.2 without my patch?
    > > >
    >
    > > Yes
    >
    > They work but they get dev->irq = 9 or 11 in the APIC enabled mode.
    > Correct?
    >
    
    Yes. All hot-added adapters get legacy IRQs like IRQ5 in the example
    below where eth2 was added after bootup:
    
    
    linux:~ # cat /proc/interrupts
               CPU0       CPU1       CPU2       CPU3
    0:     831113          0          0          0    IO-APIC-edge  timer
    1:        255          0          0          0    IO-APIC-edge  i8042
    2:          0          0          0          0          XT-PIC  cascade
    5:          0          0          0          0          XT-PIC  eth2
    8:          2          0          0          0    IO-APIC-edge  rtc
    12:         92          0          0          0   IO-APIC-edge  i8042
    14:         29          0          0          0   IO-APIC-edge  ide0
    20:          0          0          0          0   IO-APIC-level cciss0
    21:          0          0          0          0   IO-APIC-level cciss1
    29:        107          0          0          0   IO-APIC-level eth0
    30:       7702          0          0          0   IO-APIC-level aic7xxx
    31:         30          0          0          0   IO-APIC-level aic7xxx
    34:        336          0          0          0   IO-APIC-level
    cpqphp.o, cpqphp.o
    NMI:          0          0          0          0
    LOC:     830760     830893     830892     830891
    ERR:          0
    MIS:          0
    
    I attached a patch that does the legacy mode check that Dan suggested
    and IRQs for hot-added adapters seems to be given out in the APIC range.
    07c9872e
cpqphp_ctrl.c 78.2 KB