lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 1/2] genirq: allow usage of no_irq_chip
On Sat, 10 Jun 2006 10:15:11 -0000
Thomas Gleixner <tglx@linutronix.de> wrote:

>
> Some dumb interrupt hardware has no way to ack/mask.... Instead of creating a
> seperate chip structure we allow to reuse the already existing no_irq_chip
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> kernel/irq/handle.c | 8 ++++++--
> kernel/irq/manage.c | 2 +-
> kernel/irq/proc.c | 5 ++---
> 3 files changed, 9 insertions(+), 6 deletions(-)
>
> Index: linux-2.6.17-rc6-mm/kernel/irq/handle.c
> ===================================================================
> --- linux-2.6.17-rc6-mm.orig/kernel/irq/handle.c 2006-06-10 10:32:51.000000000 +0200
> +++ linux-2.6.17-rc6-mm/kernel/irq/handle.c 2006-06-10 10:42:22.000000000 +0200
> @@ -63,8 +63,12 @@
> */
> static void ack_bad(unsigned int irq)
> {
> - print_irq_desc(irq, irq_desc + irq);
> - ack_bad_irq(irq);
> + struct irq_desc *desc = irq_desc + irq;
> +
> + if (desc->handle_irq == handle_bad_irq) {
> + print_irq_desc(irq, desc);
> + ack_bad_irq(irq);
> + }
> }
>
> /*
> @@ -89,6 +93,7 @@
> .enable = noop,
> .disable = noop,
> .ack = ack_bad,
> + .unmask = noop,
> .end = noop,
> };
>
> Index: linux-2.6.17-rc6-mm/kernel/irq/manage.c
> ===================================================================
> --- linux-2.6.17-rc6-mm.orig/kernel/irq/manage.c 2006-06-10 10:32:53.000000000 +0200
> +++ linux-2.6.17-rc6-mm/kernel/irq/manage.c 2006-06-10 10:42:22.000000000 +0200
> @@ -199,7 +199,7 @@
> if (irq >= NR_IRQS)
> return -EINVAL;
>
> - if (desc->chip == &no_irq_chip)
> + if (desc->handle_irq == &handle_bad_irq)
> return -ENOSYS;
> /*
> * Some drivers like serial.c use request_irq() heavily,
> Index: linux-2.6.17-rc6-mm/kernel/irq/proc.c
> ===================================================================
> --- linux-2.6.17-rc6-mm.orig/kernel/irq/proc.c 2006-06-10 10:32:49.000000000 +0200
> +++ linux-2.6.17-rc6-mm/kernel/irq/proc.c 2006-06-10 10:42:22.000000000 +0200
> @@ -116,9 +116,8 @@
> {
> char name [MAX_NAMELEN];
>
> - if (!root_irq_dir ||
> - (irq_desc[irq].chip == &no_irq_chip) ||
> - irq_desc[irq].dir)
> + if (!root_irq_dir || (irq_desc[irq].handle_irq == &handle_bad_irq) ||
> + irq_desc[irq].dir)
> return;
>
> memset(name, 0, MAX_NAMELEN);
>

This is the patch which causes powerpc to crash. In a quite ugly manner:
early oops, falls into xmon, keeps oopsing from within xmon. No serial
port, too early for netconsole.

I'll drop it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-22 01:15    [W:0.047 / U:1.084 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site