Re: [patch 1/2] genirq: allow usage of no_irq_chip

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

 



On Sat, 10 Jun 2006 10:15:11 -0000
Thomas Gleixner <[email protected]> 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 <[email protected]>
> 
>  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux