• Paul Mackerras's avatar
    [PATCH] Clean up IRQ mapping code · a9eceedc
    Paul Mackerras authored
    On the larger ppc64 machines we remap the interrupt numbers used by
    the hardware/firmware to virtual IRQ numbers < NR_IRQS.  Up until now
    we have used an array for the "real" (hardware) -> virtual IRQ number
    mapping, but with new machines coming out that will have 24-bit
    hardware IRQ numbers, this will break.  However, in fact it is only
    the XICS interrupt controller which cares about this mapping.  This
    patch moves that side of the mapping (real -> virtual) into the XICS
    code and makes it use a radix tree.
    
    On iSeries we have a similar issue, where the "real" IRQ numbers that
    we need are in fact an encoding of the bus/device/function address of
    the device.  This patch fixes iSeries to use the virt->real IRQ
    mapping, allowing us to support larger iSeries machines.  This patch
    also gets rid of the temporary hack that Stephen Rothwell submitted.
    
    On machines with OpenPIC (including the G5) the mapping is explicitly
    1-1, and that hasn't changed.  For other machines this patch cleans up
    and simplifies the code that sets up the virtual->real mapping.
    
    I have tested this code and verified that G5, pSeries and iSeries boot
    and run correctly with this patch.
    a9eceedc
iSeries_irq.c 7.04 KB