linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 13/16] add IRQ remapping
@ 2006-11-15 10:18 Ishizaki Kou
  2006-11-15 23:58 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Ishizaki Kou @ 2006-11-15 10:18 UTC (permalink / raw)
  To: linuxppc-dev

This patch adds irq remapping.
On interrupt mechanism on Beat, when an irq outlet who has an id
hich is formerly used is created, remapping the irq is required.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
---

Index: linux-2.6.19/arch/powerpc/kernel/irq.c
diff -u linux-2.6.19/arch/powerpc/kernel/irq.c:1.1.1.2 linux-2.6.19/arch/powerpc/kernel/irq.c:1.4
--- linux-2.6.19/arch/powerpc/kernel/irq.c:1.1.1.2	Tue Oct 17 08:40:57 2006
+++ linux-2.6.19/arch/powerpc/kernel/irq.c	Mon Nov  6 22:04:23 2006
@@ -534,6 +534,8 @@
 	 */
 	virq = irq_find_mapping(host, hwirq);
 	if (virq != IRQ_NONE) {
+		if (host->ops->remap)
+			host->ops->remap(host, virq, hwirq);
 		pr_debug("irq: -> existing mapping on virq %d\n", virq);
 		return virq;
 	}
Index: linux-2.6.19/include/asm-powerpc/irq.h
diff -u linux-2.6.19/include/asm-powerpc/irq.h:1.1.1.2 linux-2.6.19/include/asm-powerpc/irq.h:1.3
--- linux-2.6.19/include/asm-powerpc/irq.h:1.1.1.2	Tue Oct 17 08:44:31 2006
+++ linux-2.6.19/include/asm-powerpc/irq.h	Tue Oct 17 13:22:53 2006
@@ -89,6 +89,9 @@
 	/* Dispose of such a mapping */
 	void (*unmap)(struct irq_host *h, unsigned int virq);
 
+	/* Update of such a mapping  */
+	void (*remap)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw);
+
 	/* Translate device-tree interrupt specifier from raw format coming
 	 * from the firmware to a irq_hw_number_t (interrupt line number) and
 	 * type (sense) that can be passed to set_irq_type(). In the absence

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 13/16] add IRQ remapping
  2006-11-15 10:18 [PATCH 13/16] add IRQ remapping Ishizaki Kou
@ 2006-11-15 23:58 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2006-11-15 23:58 UTC (permalink / raw)
  To: Ishizaki Kou; +Cc: linuxppc-dev

On Wed, 2006-11-15 at 19:18 +0900, Ishizaki Kou wrote:
> This patch adds irq remapping.
> On interrupt mechanism on Beat, when an irq outlet who has an id
> hich is formerly used is created, remapping the irq is required.
> 
> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> 
> Index: linux-2.6.19/arch/powerpc/kernel/irq.c
> diff -u linux-2.6.19/arch/powerpc/kernel/irq.c:1.1.1.2 linux-2.6.19/arch/powerpc/kernel/irq.c:1.4
> --- linux-2.6.19/arch/powerpc/kernel/irq.c:1.1.1.2	Tue Oct 17 08:40:57 2006
> +++ linux-2.6.19/arch/powerpc/kernel/irq.c	Mon Nov  6 22:04:23 2006
> @@ -534,6 +534,8 @@
>  	 */
>  	virq = irq_find_mapping(host, hwirq);
>  	if (virq != IRQ_NONE) {
> +		if (host->ops->remap)
> +			host->ops->remap(host, virq, hwirq);
>  		pr_debug("irq: -> existing mapping on virq %d\n", virq);
>  		return virq;
>  	}
> Index: linux-2.6.19/include/asm-powerpc/irq.h
> diff -u linux-2.6.19/include/asm-powerpc/irq.h:1.1.1.2 linux-2.6.19/include/asm-powerpc/irq.h:1.3
> --- linux-2.6.19/include/asm-powerpc/irq.h:1.1.1.2	Tue Oct 17 08:44:31 2006
> +++ linux-2.6.19/include/asm-powerpc/irq.h	Tue Oct 17 13:22:53 2006
> @@ -89,6 +89,9 @@
>  	/* Dispose of such a mapping */
>  	void (*unmap)(struct irq_host *h, unsigned int virq);
>  
> +	/* Update of such a mapping  */
> +	void (*remap)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw);
> +
>  	/* Translate device-tree interrupt specifier from raw format coming
>  	 * from the firmware to a irq_hw_number_t (interrupt line number) and
>  	 * type (sense) that can be passed to set_irq_type(). In the absence
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-15 23:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-15 10:18 [PATCH 13/16] add IRQ remapping Ishizaki Kou
2006-11-15 23:58 ` Benjamin Herrenschmidt

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).