From patchwork Fri Mar 25 14:10:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 88386 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 09932B6F9B for ; Sat, 26 Mar 2011 01:11:07 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728Ab1CYOKw (ORCPT ); Fri, 25 Mar 2011 10:10:52 -0400 Received: from www.linutronix.de ([62.245.132.108]:36793 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752557Ab1CYOKt (ORCPT ); Fri, 25 Mar 2011 10:10:49 -0400 Received: from localhost ([127.0.0.1] helo=localhost6.localdomain6) by Galois.linutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Q37iy-0004QL-BC; Fri, 25 Mar 2011 15:10:48 +0100 Message-Id: <20110325140947.231703709@linutronix.de> User-Agent: quilt/0.48-1 Date: Fri, 25 Mar 2011 14:10:47 -0000 From: Thomas Gleixner To: David Miller Cc: sparclinux@vger.kernel.org Subject: [patch 4/4] sparc: Use generic show_interrupts() References: <20110325140808.738196492@linutronix.de> Content-Disposition: inline; filename=sparc-use-generic-show.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Signed-off-by: Thomas Gleixner Cc: sparclinux@vger.kernel.org --- arch/sparc/Kconfig | 1 + arch/sparc/kernel/irq_64.c | 45 +++++---------------------------------------- 2 files changed, 6 insertions(+), 40 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6-tip/arch/sparc/Kconfig =================================================================== --- linux-2.6-tip.orig/arch/sparc/Kconfig +++ linux-2.6-tip/arch/sparc/Kconfig @@ -52,6 +52,7 @@ config SPARC64 select PERF_USE_VMALLOC select HAVE_GENERIC_HARDIRQS select GENERIC_HARDIRQS_NO_DEPRECATED + select GENERIC_IRQ_SHOW select IRQ_PREFLOW_FASTEOI config ARCH_DEFCONFIG Index: linux-2.6-tip/arch/sparc/kernel/irq_64.c =================================================================== --- linux-2.6-tip.orig/arch/sparc/kernel/irq_64.c +++ linux-2.6-tip/arch/sparc/kernel/irq_64.c @@ -162,47 +162,12 @@ void irq_free(unsigned int irq) /* * /proc/interrupts printing: */ - -int show_interrupts(struct seq_file *p, void *v) +int arch_show_interrupts(struct seq_file *p, int prec) { - int i = *(loff_t *) v, j; - struct irqaction * action; - unsigned long flags; - - if (i == 0) { - seq_printf(p, " "); - for_each_online_cpu(j) - seq_printf(p, "CPU%d ",j); - seq_putc(p, '\n'); - } - - if (i < NR_IRQS) { - raw_spin_lock_irqsave(&irq_desc[i].lock, flags); - action = irq_desc[i].action; - if (!action) - goto skip; - seq_printf(p, "%3d: ",i); -#ifndef CONFIG_SMP - seq_printf(p, "%10u ", kstat_irqs(i)); -#else - for_each_online_cpu(j) - seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); -#endif - seq_printf(p, " %9s", irq_desc[i].irq_data.chip->name); - seq_printf(p, " %s", action->name); - - for (action=action->next; action; action = action->next) - seq_printf(p, ", %s", action->name); - - seq_putc(p, '\n'); -skip: - raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); - } else if (i == NR_IRQS) { - seq_printf(p, "NMI: "); - for_each_online_cpu(j) - seq_printf(p, "%10u ", cpu_data(j).__nmi_count); - seq_printf(p, " Non-maskable interrupts\n"); - } + seq_printf(p, "NMI: "); + for_each_online_cpu(j) + seq_printf(p, "%10u ", cpu_data(j).__nmi_count); + seq_printf(p, " Non-maskable interrupts\n"); return 0; }