Skip to content
  • Eric W. Biederman's avatar
    [PATCH] x86_64 irq: Allocate a vector across all cpus for genapic_flat. · c7111c13
    Eric W. Biederman authored
    
    
    The problem we can't take advantage of lowest priority delivery mode if
    the vectors are allocated for only one cpu at a time.  Nor can we work
    around hardware that assumes lowest priority delivery mode is always
    used with several cpus.
    
    So this patch introduces the concept of a vector_allocation_domain.  A
    set of cpus that will receive an irq on the same vector.  Currently the
    code for implementing this is placed in the genapic structure so we can
    vary this depending on how we are using the io_apics.
    
    This allows us to restore the previous behaviour of genapic_flat without
    removing the benefits of having separate vector allocation for large
    machines.
    
    This should also fix the problem report where a hyperthreaded cpu was
    receving the irq on the wrong hyperthread when in logical delivery mode
    because the previous behaviour is restored.
    
    This patch properly records our allocation of the first 16 irqs to the
    first 16 available vectors on all cpus.  This should be fine but it may
    run into problems with multiple interrupts at the same interrupt level.
    Except for some badly maintained comments in the code and the behaviour
    of the interrupt allocator I have no real understanding of that problem.
    
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    Acked-by: default avatarMuli Ben-Yehuda <muli@il.ibm.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    c7111c13