[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Preliminary 2.6.19 support for PetaLinux



Hello,

I forgot one patch which implements a first version of the
/proc/interrupts interface.

Hans

John Williams <jwilliams@xxxxxxxxxxxxxx> wrote:
> Hi folks,
> 
> Preliminary patchsets and build instructions for 2.6.19 MicroBlaze 
> support can be found here:
> 
> http://developer.petalogix.com/wiki/MicroBlaze-2.6-Kernel
> 
> Please direct any questions, problems etc to this list.
> 
> Right now the best thing people can do is try it out, and let us know 
> what's missing, what works and what doesn't.  We will release regular 
> updates of our internal development trees as this progresses.
> 
> Ultimately this will be folded out into the standard petalinux 
> distribution, and also upstream towards kernel.org.
> 
> Cheers,
> 
> John
> 
> 
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : 
> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/

-- 
Dr. Johann Pfefferl   ------------   mailto j.pfefferl at eubus dot net
Eubus GmbH            http://www.eubus.net +++++ http://www.hydraxc.com
Phone: +49 (0)89 45 22 578-67
Fax:   +49 (0)89 45 22 578-55
==
 -o)   A computer program does what you tell it to do,
 /\\        not what you want it to do.               
_\_v-                                                 
Added first version of /proc/interrupts interface

---
commit 1910d47664d011a2c5a304983257e974910798b8
tree 7b44ac081b53aee1a818107e9f8985c0d9e28ad2
parent 54bc1b3412fc8f0043ffd119bd26dc0b6c3391f6
author Dr. Johann Pfefferl <pfefferl@xxxxxxx> Wed, 28 Feb 2007 19:48:36 +0100
committer Dr. Johann Pfefferl <pfefferl@xxxxxxxxxxxxxxx> Wed, 28 Feb 2007 19:48:36 +0100

 arch/microblaze/kernel/irq.c |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/kernel/irq.c b/arch/microblaze/kernel/irq.c
index 042a966..c2f5a2b 100644
--- a/arch/microblaze/kernel/irq.c
+++ b/arch/microblaze/kernel/irq.c
@@ -13,6 +13,7 @@
 #include <linux/hardirq.h>
 #include <linux/irqflags.h>
 #include <linux/seq_file.h>
+#include <linux/kernel_stat.h>
 
 /*
  * 'what should we do if we get a hw irq event on an illegal vector'.
@@ -40,6 +41,40 @@ void do_IRQ(struct pt_regs *regs)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-/* TBD (used by procfs) */
+	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%-8d",j);
+		seq_putc(p, '\n');
+	}
+
+	if (i < NR_IRQS) {
+		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_cpu(j).irqs[i]);
+#endif
+		seq_printf(p, " %8s", irq_desc[i].status & IRQ_LEVEL ? "level": "edge");
+		seq_printf(p, " %8s", irq_desc[i].chip->name);
+		//seq_printf(p, "-%-8s", irq_desc[i].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:
+		spin_unlock_irqrestore(&irq_desc[i].lock, flags);
+  }
 	return 0;
 }