lkml.org 
[lkml]   [2010]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    DateThu, 30 Sep 2010 23:17:52 -0000
    FromThomas Gleixner <>
    Subject[patch 38/47] x86: Use sane enumeration
    Instead of looping through all interrupts, use the bitmap lookup to
    find the next.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    ---
    arch/x86/kernel/apic/io_apic.c | 16 +++++++---------
    1 file changed, 7 insertions(+), 9 deletions(-)
    Index: linux-2.6-tip/arch/x86/kernel/apic/io_apic.c
    ===================================================================
    --- linux-2.6-tip.orig/arch/x86/kernel/apic/io_apic.c
    +++ linux-2.6-tip/arch/x86/kernel/apic/io_apic.c
    @@ -1179,7 +1179,7 @@ void __setup_vector_irq(int cpu)
    */
    raw_spin_lock(&vector_lock);
    /* Mark the inuse vectors */
    - for_each_irq_nr(irq) {
    + for_each_active_irq(irq) {
    cfg = get_irq_chip_data(irq);
    if (!cfg)
    continue;
    @@ -1537,7 +1537,6 @@ __apicdebuginit(void) print_IO_APIC(void
    union IO_APIC_reg_03 reg_03;
    unsigned long flags;
    struct irq_cfg *cfg;
    - struct irq_desc *desc;
    unsigned int irq;

    printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
    @@ -1624,10 +1623,10 @@ __apicdebuginit(void) print_IO_APIC(void
    }
    }
    printk(KERN_DEBUG "IRQ to pin mappings:\n");
    - for_each_irq_desc(irq, desc) {
    + for_each_active_irq(irq) {
    struct irq_pin_list *entry;

    - cfg = get_irq_desc_chip_data(desc);
    + cfg = get_irq_chip_data(irq);
    if (!cfg)
    continue;
    entry = cfg->irq_2_pin;
    @@ -2596,9 +2595,8 @@ static struct irq_chip ir_ioapic_chip __

    static inline void init_IO_APIC_traps(void)
    {
    - int irq;
    - struct irq_desc *desc;
    struct irq_cfg *cfg;
    + unsigned int irq;

    /*
    * NOTE! The local APIC isn't very good at handling
    @@ -2611,8 +2609,8 @@ static inline void init_IO_APIC_traps(vo
    * Also, we've got to be careful not to trash gate
    * 0x80, because int 0x80 is hm, kind of importantish. ;)
    */
    - for_each_irq_desc(irq, desc) {
    - cfg = get_irq_desc_chip_data(desc);
    + for_each_active_irq(irq) {
    + cfg = get_irq_chip_data(irq);
    if (IO_APIC_IRQ(irq) && cfg && !cfg->vector) {
    /*
    * Hmm.. We don't have an entry for this,
    @@ -2623,7 +2621,7 @@ static inline void init_IO_APIC_traps(vo
    legacy_pic->make_irq(irq);
    else
    /* Strange. Oh, well.. */
    - desc->chip = &no_irq_chip;
    + set_irq_chip(irq, &no_irq_chip);
    }
    }
    }



    \
     
     \ /
      Last update: 2010-10-03 22:31    [from the cache]
    ©2003-2010