All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/3] avr32: Interrupt cleanups and API change preparation
@ 2015-07-13 20:31 Thomas Gleixner
  2015-07-13 20:31 ` [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:31 UTC (permalink / raw
  To: LKML; +Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Jiang Liu

The following patch series contains the following changes:

    - Consolidation of chained interrupt handler setup/removal

    - Switch to functions which avoid a redundant interrupt
      descriptor lookup

    - Preparation of interrupt flow handlers for the 'irq' argument
      removal

The series has no dependencies and is also available as a git branch
for your convenience:

 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/avr32

If you want me to carry the patches in the irq/core branch of tip,
please let me know.

Thanks,

	tglx




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

* [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove
  2015-07-13 20:31 [patch 0/3] avr32: Interrupt cleanups and API change preparation Thomas Gleixner
@ 2015-07-13 20:31 ` Thomas Gleixner
  2015-07-15 11:51   ` Hans-Christian Egtvedt
  2015-07-27  6:12   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-13 20:31 ` [patch 2/3] avr32/at32ap: Use irq_set_handler_locked() Thomas Gleixner
  2015-07-13 20:31 ` [patch 3/3] avr32/irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:31 UTC (permalink / raw
  To: LKML
  Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Jiang Liu,
	Russell King, Julia Lawall

[-- Attachment #1: avr32-at32ap-Consolidate-chained-IRQ-handler-install.patch --]
[-- Type: text/plain, Size: 1275 bytes --]

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
---
 arch/avr32/mach-at32ap/pio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: tip/arch/avr32/mach-at32ap/pio.c
===================================================================
--- tip.orig/arch/avr32/mach-at32ap/pio.c
+++ tip/arch/avr32/mach-at32ap/pio.c
@@ -312,7 +312,6 @@ gpio_irq_setup(struct pio_device *pio, i
 	unsigned	i;
 
 	irq_set_chip_data(irq, pio);
-	irq_set_handler_data(irq, (void *)gpio_irq);
 
 	for (i = 0; i < 32; i++, gpio_irq++) {
 		irq_set_chip_data(gpio_irq, pio);
@@ -320,7 +319,8 @@ gpio_irq_setup(struct pio_device *pio, i
 					 handle_simple_irq);
 	}
 
-	irq_set_chained_handler(irq, gpio_irq_handler);
+	irq_set_chained_handler_and_data(irq, gpio_irq_handler,
+					 (void *)gpio_irq);
 }
 
 /*--------------------------------------------------------------------------*/



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

* [patch 2/3] avr32/at32ap: Use irq_set_handler_locked()
  2015-07-13 20:31 [patch 0/3] avr32: Interrupt cleanups and API change preparation Thomas Gleixner
  2015-07-13 20:31 ` [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove Thomas Gleixner
@ 2015-07-13 20:31 ` Thomas Gleixner
  2015-07-15 11:52   ` Hans-Christian Egtvedt
  2015-07-27  6:13   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  2015-07-13 20:31 ` [patch 3/3] avr32/irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:31 UTC (permalink / raw
  To: LKML; +Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Jiang Liu,
	Julia Lawall

[-- Attachment #1: avr32-at32ap-Use-irq_set_handler_locked.patch --]
[-- Type: text/plain, Size: 1070 bytes --]

Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
---
 arch/avr32/mach-at32ap/extint.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: tip/arch/avr32/mach-at32ap/extint.c
===================================================================
--- tip.orig/arch/avr32/mach-at32ap/extint.c
+++ tip/arch/avr32/mach-at32ap/extint.c
@@ -128,9 +128,9 @@ static int eic_set_irq_type(struct irq_d
 
 	irqd_set_trigger_type(d, flow_type);
 	if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
-		__irq_set_handler_locked(irq, handle_level_irq);
+		irq_set_handler_locked(d, handle_level_irq);
 	else
-		__irq_set_handler_locked(irq, handle_edge_irq);
+		irq_set_handler_locked(d, handle_edge_irq);
 
 	return IRQ_SET_MASK_OK_NOCOPY;
 }



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

* [patch 3/3] avr32/irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-07-13 20:31 [patch 0/3] avr32: Interrupt cleanups and API change preparation Thomas Gleixner
  2015-07-13 20:31 ` [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove Thomas Gleixner
  2015-07-13 20:31 ` [patch 2/3] avr32/at32ap: Use irq_set_handler_locked() Thomas Gleixner
@ 2015-07-13 20:31 ` Thomas Gleixner
  2015-07-27  6:13   ` [tip:irq/core] " tip-bot for Jiang Liu
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:31 UTC (permalink / raw
  To: LKML; +Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Jiang Liu

[-- Attachment #1: avr32-irq-Use-irq_desc_get_xxx-to-avoid-redundant-lo.patch --]
[-- Type: text/plain, Size: 933 bytes --]

From: Jiang Liu <jiang.liu@linux.intel.com>

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/avr32/mach-at32ap/pio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: tip/arch/avr32/mach-at32ap/pio.c
===================================================================
--- tip.orig/arch/avr32/mach-at32ap/pio.c
+++ tip/arch/avr32/mach-at32ap/pio.c
@@ -286,7 +286,7 @@ static void gpio_irq_handler(unsigned ir
 	struct pio_device	*pio = irq_desc_get_chip_data(desc);
 	unsigned		gpio_irq;
 
-	gpio_irq = (unsigned) irq_get_handler_data(irq);
+	gpio_irq = (unsigned) irq_desc_get_handler_data(desc);
 	for (;;) {
 		u32		isr;
 



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

* Re: [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove
  2015-07-13 20:31 ` [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove Thomas Gleixner
@ 2015-07-15 11:51   ` Hans-Christian Egtvedt
  2015-07-27  6:12   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 9+ messages in thread
From: Hans-Christian Egtvedt @ 2015-07-15 11:51 UTC (permalink / raw
  To: Thomas Gleixner
  Cc: LKML, Haavard Skinnemoen, Jiang Liu, Russell King, Julia Lawall

Around Mon 13 Jul 2015 20:31:09 -0000 or thereabout, Thomas Gleixner wrote:
> Chained irq handlers usually set up handler data as well. We now have
> a function to set both under irq_desc->lock. Replace the two calls
> with one.
> 
> Search and conversion was done with coccinelle.
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Julia Lawall <Julia.Lawall@lip6.fr>
> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

> ---
>  arch/avr32/mach-at32ap/pio.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Index: tip/arch/avr32/mach-at32ap/pio.c
> ===================================================================
> --- tip.orig/arch/avr32/mach-at32ap/pio.c
> +++ tip/arch/avr32/mach-at32ap/pio.c
> @@ -312,7 +312,6 @@ gpio_irq_setup(struct pio_device *pio, i
>  	unsigned	i;
>  
>  	irq_set_chip_data(irq, pio);
> -	irq_set_handler_data(irq, (void *)gpio_irq);
>  
>  	for (i = 0; i < 32; i++, gpio_irq++) {
>  		irq_set_chip_data(gpio_irq, pio);
> @@ -320,7 +319,8 @@ gpio_irq_setup(struct pio_device *pio, i
>  					 handle_simple_irq);
>  	}
>  
> -	irq_set_chained_handler(irq, gpio_irq_handler);
> +	irq_set_chained_handler_and_data(irq, gpio_irq_handler,
> +					 (void *)gpio_irq);
>  }
>  
>  /*--------------------------------------------------------------------------*/
-- 
mvh
Hans-Christian Egtvedt

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

* Re: [patch 2/3] avr32/at32ap: Use irq_set_handler_locked()
  2015-07-13 20:31 ` [patch 2/3] avr32/at32ap: Use irq_set_handler_locked() Thomas Gleixner
@ 2015-07-15 11:52   ` Hans-Christian Egtvedt
  2015-07-27  6:13   ` [tip:irq/core] " tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 9+ messages in thread
From: Hans-Christian Egtvedt @ 2015-07-15 11:52 UTC (permalink / raw
  To: Thomas Gleixner; +Cc: LKML, Haavard Skinnemoen, Jiang Liu, Julia Lawall

Around Mon 13 Jul 2015 20:31:10 -0000 or thereabout, Thomas Gleixner wrote:
> Use irq_set_handler_locked() as it avoids a redundant lookup of the
> irq descriptor.
> 
> Search and replacement was done with coccinelle.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jiang Liu <jiang.liu@linux.intel.com>
> Cc: Julia Lawall <julia.lawall@lip6.fr>
> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

> ---
>  arch/avr32/mach-at32ap/extint.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Index: tip/arch/avr32/mach-at32ap/extint.c
> ===================================================================
> --- tip.orig/arch/avr32/mach-at32ap/extint.c
> +++ tip/arch/avr32/mach-at32ap/extint.c
> @@ -128,9 +128,9 @@ static int eic_set_irq_type(struct irq_d
>  
>  	irqd_set_trigger_type(d, flow_type);
>  	if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
> -		__irq_set_handler_locked(irq, handle_level_irq);
> +		irq_set_handler_locked(d, handle_level_irq);
>  	else
> -		__irq_set_handler_locked(irq, handle_edge_irq);
> +		irq_set_handler_locked(d, handle_edge_irq);
>  
>  	return IRQ_SET_MASK_OK_NOCOPY;
>  }
-- 
mvh
Hans-Christian Egtvedt

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

* [tip:irq/core] avr32/at32ap: Consolidate chained IRQ handler install/remove
  2015-07-13 20:31 ` [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove Thomas Gleixner
  2015-07-15 11:51   ` Hans-Christian Egtvedt
@ 2015-07-27  6:12   ` tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 9+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27  6:12 UTC (permalink / raw
  To: linux-tip-commits
  Cc: hskinnemoen, hpa, egtvedt, jiang.liu, Julia.Lawall, linux-kernel,
	tglx, rmk+kernel, mingo

Commit-ID:  4365160def95ef2f5da9b5cc5660e5747e5e1956
Gitweb:     http://git.kernel.org/tip/4365160def95ef2f5da9b5cc5660e5747e5e1956
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:31:09 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 26 Jul 2015 11:47:25 +0200

avr32/at32ap: Consolidate chained IRQ handler install/remove

Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.

Search and conversion was done with coccinelle.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150713100606.351640193@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/avr32/mach-at32ap/pio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 903c7d8..6c7035a 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -312,7 +312,6 @@ gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq)
 	unsigned	i;
 
 	irq_set_chip_data(irq, pio);
-	irq_set_handler_data(irq, (void *)gpio_irq);
 
 	for (i = 0; i < 32; i++, gpio_irq++) {
 		irq_set_chip_data(gpio_irq, pio);
@@ -320,7 +319,8 @@ gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq)
 					 handle_simple_irq);
 	}
 
-	irq_set_chained_handler(irq, gpio_irq_handler);
+	irq_set_chained_handler_and_data(irq, gpio_irq_handler,
+					 (void *)gpio_irq);
 }
 
 /*--------------------------------------------------------------------------*/

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

* [tip:irq/core] avr32/at32ap: Use irq_set_handler_locked()
  2015-07-13 20:31 ` [patch 2/3] avr32/at32ap: Use irq_set_handler_locked() Thomas Gleixner
  2015-07-15 11:52   ` Hans-Christian Egtvedt
@ 2015-07-27  6:13   ` tip-bot for Thomas Gleixner
  1 sibling, 0 replies; 9+ messages in thread
From: tip-bot for Thomas Gleixner @ 2015-07-27  6:13 UTC (permalink / raw
  To: linux-tip-commits
  Cc: mingo, tglx, jiang.liu, hpa, hskinnemoen, julia.lawall, egtvedt,
	linux-kernel

Commit-ID:  4f31dd63e050b777d3f3139197c4b3860aa89301
Gitweb:     http://git.kernel.org/tip/4f31dd63e050b777d3f3139197c4b3860aa89301
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 13 Jul 2015 20:31:10 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 26 Jul 2015 11:47:25 +0200

avr32/at32ap: Use irq_set_handler_locked()

Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Link: http://lkml.kernel.org/r/20150713100606.448031045@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/avr32/mach-at32ap/extint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index 2d48b6a..d51ff8f 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -128,9 +128,9 @@ static int eic_set_irq_type(struct irq_data *d, unsigned int flow_type)
 
 	irqd_set_trigger_type(d, flow_type);
 	if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
-		__irq_set_handler_locked(irq, handle_level_irq);
+		irq_set_handler_locked(d, handle_level_irq);
 	else
-		__irq_set_handler_locked(irq, handle_edge_irq);
+		irq_set_handler_locked(d, handle_edge_irq);
 
 	return IRQ_SET_MASK_OK_NOCOPY;
 }

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

* [tip:irq/core] avr32/irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  2015-07-13 20:31 ` [patch 3/3] avr32/irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
@ 2015-07-27  6:13   ` tip-bot for Jiang Liu
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Jiang Liu @ 2015-07-27  6:13 UTC (permalink / raw
  To: linux-tip-commits
  Cc: jiang.liu, hskinnemoen, mingo, linux-kernel, hpa, tglx, egtvedt

Commit-ID:  df6e23ae62d46a524ba3db95a201904a01419bdc
Gitweb:     http://git.kernel.org/tip/df6e23ae62d46a524ba3db95a201904a01419bdc
Author:     Jiang Liu <jiang.liu@linux.intel.com>
AuthorDate: Mon, 13 Jul 2015 20:31:12 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 26 Jul 2015 11:47:25 +0200

avr32/irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Link: http://lkml.kernel.org/r/20150713100606.527106283@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/avr32/mach-at32ap/pio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 6c7035a..157a5e0 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -286,7 +286,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 	struct pio_device	*pio = irq_desc_get_chip_data(desc);
 	unsigned		gpio_irq;
 
-	gpio_irq = (unsigned) irq_get_handler_data(irq);
+	gpio_irq = (unsigned) irq_desc_get_handler_data(desc);
 	for (;;) {
 		u32		isr;
 

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

end of thread, other threads:[~2015-07-27  6:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-13 20:31 [patch 0/3] avr32: Interrupt cleanups and API change preparation Thomas Gleixner
2015-07-13 20:31 ` [patch 1/3] avr32/at32ap: Consolidate chained IRQ handler install/remove Thomas Gleixner
2015-07-15 11:51   ` Hans-Christian Egtvedt
2015-07-27  6:12   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-13 20:31 ` [patch 2/3] avr32/at32ap: Use irq_set_handler_locked() Thomas Gleixner
2015-07-15 11:52   ` Hans-Christian Egtvedt
2015-07-27  6:13   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2015-07-13 20:31 ` [patch 3/3] avr32/irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc Thomas Gleixner
2015-07-27  6:13   ` [tip:irq/core] " tip-bot for Jiang Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.