lkml.org 
[lkml]   [2009]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[rfc 1/4] x86: irq.c - tiny cleanup
    Impact: cleanup

    1) guard ack_bad_irq with printk_ratelimit since there is no
    guarantee we will not be flooded one day
    2) use pr_emerg helper

    Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
    ---
    arch/x86/kernel/irq.c | 9 +++++----
    1 file changed, 5 insertions(+), 4 deletions(-)

    Index: linux-2.6.git/arch/x86/kernel/irq.c
    =====================================================================
    --- linux-2.6.git.orig/arch/x86/kernel/irq.c
    +++ linux-2.6.git/arch/x86/kernel/irq.c
    @@ -24,7 +24,8 @@ void (*generic_interrupt_extension)(void
    */
    void ack_bad_irq(unsigned int irq)
    {
    - printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq);
    + if (printk_ratelimit())
    + pr_err("unexpected IRQ trap at vector %02x\n", irq);

    #ifdef CONFIG_X86_LOCAL_APIC
    /*
    @@ -188,7 +189,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
    sum += irq_stats(cpu)->irq_thermal_count;
    # ifdef CONFIG_X86_64
    sum += irq_stats(cpu)->irq_threshold_count;
    -#endif
    +# endif
    #endif
    return sum;
    }
    @@ -229,8 +230,8 @@ unsigned int __irq_entry do_IRQ(struct p
    #endif

    if (printk_ratelimit())
    - printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n",
    - __func__, smp_processor_id(), vector, irq);
    + pr_emerg("%s: %d.%d No irq handler for vector (irq %d)\n",
    + __func__, smp_processor_id(), vector, irq);
    }

    irq_exit();


    \
     
     \ /
      Last update: 2009-04-12 18:55    [W:0.021 / U:2.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site