From: Thomas Gleixner <tglx@linutronix.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Lennert Buytenhek <buytenh@secretlab.ca>, linuxppc-dev@lists.ozlabs.org
Subject: [patch 14/14] powerpc: Use generic show_interrupts()
Date: Fri, 25 Mar 2011 21:36:25 -0000 [thread overview]
Message-ID: <20110325164142.002913929@linutronix.de> (raw)
In-Reply-To: 20110325164049.138289403@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/powerpc/Kconfig | 2 +
arch/powerpc/kernel/irq.c | 61 ----------------------------------------------
2 files changed, 3 insertions(+), 60 deletions(-)
Index: linux-2.6-tip/arch/powerpc/Kconfig
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/Kconfig
+++ linux-2.6-tip/arch/powerpc/Kconfig
@@ -135,6 +135,8 @@ config PPC
select HAVE_SPARSE_IRQ
select IRQ_PER_CPU
select GENERIC_HARDIRQS_NO_DEPRECATED
+ select GENERIC_IRQ_SHOW
+ select GENERIC_IRQ_SHOW_LEVEL
config EARLY_PRINTK
bool
Index: linux-2.6-tip/arch/powerpc/kernel/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/irq.c
+++ linux-2.6-tip/arch/powerpc/kernel/irq.c
@@ -195,7 +195,7 @@ notrace void arch_local_irq_restore(unsi
EXPORT_SYMBOL(arch_local_irq_restore);
#endif /* CONFIG_PPC64 */
-static int show_other_interrupts(struct seq_file *p, int prec)
+int arch_show_interrupts(struct seq_file *p, int prec)
{
int j;
@@ -231,65 +231,6 @@ static int show_other_interrupts(struct
return 0;
}
-int show_interrupts(struct seq_file *p, void *v)
-{
- unsigned long flags, any_count = 0;
- int i = *(loff_t *) v, j, prec;
- struct irqaction *action;
- struct irq_desc *desc;
- struct irq_chip *chip;
-
- if (i > nr_irqs)
- return 0;
-
- for (prec = 3, j = 1000; prec < 10 && j <= nr_irqs; ++prec)
- j *= 10;
-
- if (i == nr_irqs)
- return show_other_interrupts(p, prec);
-
- /* print header */
- if (i == 0) {
- seq_printf(p, "%*s", prec + 8, "");
- for_each_online_cpu(j)
- seq_printf(p, "CPU%-8d", j);
- seq_putc(p, '\n');
- }
-
- desc = irq_to_desc(i);
- if (!desc)
- return 0;
-
- raw_spin_lock_irqsave(&desc->lock, flags);
- for_each_online_cpu(j)
- any_count |= kstat_irqs_cpu(i, j);
- action = desc->action;
- if (!action && !any_count)
- goto out;
-
- seq_printf(p, "%*d: ", prec, i);
- for_each_online_cpu(j)
- seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
-
- chip = get_irq_desc_chip(desc);
- if (chip)
- seq_printf(p, " %-16s", chip->name);
- else
- seq_printf(p, " %-16s", "None");
- seq_printf(p, " %-8s", (irqd_is_level_type(&desc->irq_data) ? "Level" : "Edge");
-
- if (action) {
- seq_printf(p, " %s", action->name);
- while ((action = action->next) != NULL)
- seq_printf(p, ", %s", action->name);
- }
-
- seq_putc(p, '\n');
-out:
- raw_spin_unlock_irqrestore(&desc->lock, flags);
- return 0;
-}
-
/*
* /proc/stat helpers
*/
prev parent reply other threads:[~2011-03-25 22:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 21:36 [patch 00/14] powerpc: Final irq bits for .39 Thomas Gleixner
2011-03-25 21:36 ` [patch 01/14] powerpc: Use proper accessors for IRQ_* flags Thomas Gleixner
2011-03-25 21:36 ` [patch 02/14] powerpc: media5200: Remove pointless set_irq_type() Thomas Gleixner
2011-03-25 21:36 ` [patch 03/14] powerpc: mac: pic: Use irqd_is_level_type() Thomas Gleixner
2011-03-25 21:36 ` [patch 04/14] powerpc: cell: Fix the irq_desc access Thomas Gleixner
2011-03-25 21:36 ` [patch 05/14] powerpc: cpm2_pic: Cleanup flow type handling Thomas Gleixner
2011-03-25 21:36 ` [patch 06/14] powerpc: cpm2_pic: Use IRQCHIP_EOI_IF_HANDLED Thomas Gleixner
2011-03-25 21:36 ` [patch 07/14] powerpc: ipic: Cleanup flow type handling Thomas Gleixner
2011-03-25 21:36 ` [patch 08/14] powerpc: mpc8xx_pic: " Thomas Gleixner
2011-03-25 21:36 ` [patch 09/14] powerpc: mpic: " Thomas Gleixner
2011-03-25 21:36 ` [patch 10/14] powerpc: uic: " Thomas Gleixner
2011-03-25 21:36 ` [patch 11/14] powerpc: xilinx: " Thomas Gleixner
2011-03-25 21:36 ` [patch 12/14] powerpc: irq: Use irqdata based information Thomas Gleixner
2011-03-25 21:36 ` [patch 13/14] powerpc: Convert to new irq_* function names Thomas Gleixner
2011-03-25 21:36 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110325164142.002913929@linutronix.de \
--to=tglx@linutronix.de \
--cc=benh@kernel.crashing.org \
--cc=buytenh@secretlab.ca \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).