• Andrew Morton's avatar
    [PATCH] fix for clusterd io_apics · 41541461
    Andrew Morton authored
    From: Keith Mannthey <kmannth@us.ibm.com>
    
    The following is a patch to fix inconsistent use of the function
    set_ioapic_affinity.  In the current kernel it is unclear as to weather the
    value being passed to the function is a cpu mask or valid apic id.  In
    irq_affinity_write_proc the kernel passes on a cpu mask but the kirqd thread
    passes on logical apic ids.  In flat apic mode this is not an issue because a
    cpu mask represents the apic value.  However in clustered apic mode the cpu
    mask is very different from the logical apic id.
    
    This is an attempt to do the right thing for clustered apics.  I clarify that
    the value being passed to set_ioapic_affinity is a cpu mask not a apicid.
    Set_ioapic_affinity will do the conversion to logical apic ids.  Since many
    cpu masks don't map to valid apicids in clustered apic mode TARGET_CPUS is
    used as a default value when such a situation occurs.  I think this is a good
    step in making irq_affinity clustered apic safe.
    41541461
io_apic.c 58.7 KB