mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 0/2] blackfin: Final irq cleanup
@ 2011-03-25 13:32 Thomas Gleixner
  2011-03-25 13:32 ` [patch 1/2] bfin: " Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Thomas Gleixner @ 2011-03-25 13:32 UTC (permalink / raw)
  To: LKML; +Cc: Mike Frysinger, uclinux-dist-devel

Mike,

this is the final cleanup and name space conversion, so that we can
remove the deprecated code in the core.

It would be nice to get this Linus wards for .39

Thanks,

	tglx




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

* [patch 1/2] bfin: Final irq cleanup
  2011-03-25 13:32 [patch 0/2] blackfin: Final irq cleanup Thomas Gleixner
@ 2011-03-25 13:32 ` Thomas Gleixner
  2011-03-25 13:32 ` [patch 2/2] bfin: Convert irq namespace Thomas Gleixner
  2011-03-25 21:17 ` [patch 0/2] blackfin: Final irq cleanup Mike Frysinger
  2 siblings, 0 replies; 10+ messages in thread
From: Thomas Gleixner @ 2011-03-25 13:32 UTC (permalink / raw)
  To: LKML; +Cc: Mike Frysinger, uclinux-dist-devel

[-- Attachment #1: bfin-cleanup.patch --]
[-- Type: text/plain, Size: 2811 bytes --]

Use the trigger type in irq_data and check level type instead of
looking at desc->handle_irq.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
---
 arch/blackfin/mach-bf561/smp.c            |    6 +++---
 arch/blackfin/mach-common/ints-priority.c |    9 +++------
 2 files changed, 6 insertions(+), 9 deletions(-)
Index: linux-2.6-tip/arch/blackfin/mach-bf561/smp.c
===================================================================
--- linux-2.6-tip.orig/arch/blackfin/mach-bf561/smp.c
+++ linux-2.6-tip/arch/blackfin/mach-bf561/smp.c
@@ -154,13 +154,13 @@ void platform_clear_ipi(unsigned int cpu
 void __cpuinit bfin_local_timer_setup(void)
 {
 #if defined(CONFIG_TICKSOURCE_CORETMR)
-	struct irq_chip *chip = get_irq_chip(IRQ_CORETMR);
-	struct irq_desc *desc = irq_to_desc(IRQ_CORETMR);
+	struct irq_data *data = irq_get_irq_data(IRQ_CORETMR);
+	struct irq_chip *chip = irq_data_get_chip(data);
 
 	bfin_coretmr_init();
 	bfin_coretmr_clockevent_init();
 
-	chip->irq_unmask(&desc->irq_data);
+	chip->irq_unmask(data);
 #else
 	/* Power down the core timer, just to play safe. */
 	bfin_write_TCNTL(0);
Index: linux-2.6-tip/arch/blackfin/mach-common/ints-priority.c
===================================================================
--- linux-2.6-tip.orig/arch/blackfin/mach-common/ints-priority.c
+++ linux-2.6-tip/arch/blackfin/mach-common/ints-priority.c
@@ -578,10 +578,9 @@ static void bfin_gpio_ack_irq(struct irq
 static void bfin_gpio_mask_ack_irq(struct irq_data *d)
 {
 	unsigned int irq = d->irq;
-	struct irq_desc *desc = irq_to_desc(irq);
 	u32 gpionr = irq_to_gpio(irq);
 
-	if (desc->handle_irq == handle_edge_irq)
+	if (!irqd_is_level_type(d))
 		set_gpio_data(gpionr, 0);
 
 	set_gpio_maska(gpionr, 0);
@@ -837,12 +836,11 @@ void init_pint_lut(void)
 
 static void bfin_gpio_ack_irq(struct irq_data *d)
 {
-	struct irq_desc *desc = irq_to_desc(d->irq);
 	u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
 	u32 pintbit = PINT_BIT(pint_val);
 	u32 bank = PINT_2_BANK(pint_val);
 
-	if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
+	if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
 		if (pint[bank]->invert_set & pintbit)
 			pint[bank]->invert_clear = pintbit;
 		else
@@ -854,12 +852,11 @@ static void bfin_gpio_ack_irq(struct irq
 
 static void bfin_gpio_mask_ack_irq(struct irq_data *d)
 {
-	struct irq_desc *desc = irq_to_desc(d->irq);
 	u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
 	u32 pintbit = PINT_BIT(pint_val);
 	u32 bank = PINT_2_BANK(pint_val);
 
-	if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) {
+	if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
 		if (pint[bank]->invert_set & pintbit)
 			pint[bank]->invert_clear = pintbit;
 		else



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

* [patch 2/2] bfin: Convert irq namespace
  2011-03-25 13:32 [patch 0/2] blackfin: Final irq cleanup Thomas Gleixner
  2011-03-25 13:32 ` [patch 1/2] bfin: " Thomas Gleixner
@ 2011-03-25 13:32 ` Thomas Gleixner
  2011-03-25 21:34   ` Mike Frysinger
  2011-03-25 21:17 ` [patch 0/2] blackfin: Final irq cleanup Mike Frysinger
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas Gleixner @ 2011-03-25 13:32 UTC (permalink / raw)
  To: LKML; +Cc: Mike Frysinger, uclinux-dist-devel

[-- Attachment #1: bfin-namespace.patch --]
[-- Type: text/plain, Size: 4671 bytes --]

Convert to the new function names. Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
---
 arch/blackfin/kernel/irqchip.c            |    2 -
 arch/blackfin/mach-common/ints-priority.c |   34 +++++++++++++++---------------
 2 files changed, 18 insertions(+), 18 deletions(-)

Index: linux-2.6-tip/arch/blackfin/kernel/irqchip.c
===================================================================
--- linux-2.6-tip.orig/arch/blackfin/kernel/irqchip.c
+++ linux-2.6-tip/arch/blackfin/kernel/irqchip.c
@@ -48,7 +48,7 @@ int show_interrupts(struct seq_file *p, 
 		seq_printf(p, "%3d: ", i);
 		for_each_online_cpu(j)
 			seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
-		seq_printf(p, " %8s", get_irq_desc_chip(desc)->name);
+		seq_printf(p, " %8s", irq_desc_get_chip(desc)->name);
 		seq_printf(p, "  %s", action->name);
 		for (action = action->next; action; action = action->next)
 			seq_printf(p, "  %s", action->name);
Index: linux-2.6-tip/arch/blackfin/mach-common/ints-priority.c
===================================================================
--- linux-2.6-tip.orig/arch/blackfin/mach-common/ints-priority.c
+++ linux-2.6-tip/arch/blackfin/mach-common/ints-priority.c
@@ -559,7 +559,7 @@ static inline void bfin_set_irq_handler(
 #ifdef CONFIG_IPIPE
 	handle = handle_level_irq;
 #endif
-	__set_irq_handler_unlocked(irq, handle);
+	__irq_set_handler_locked(irq, handle);
 }
 
 static DECLARE_BITMAP(gpio_enabled, MAX_BLACKFIN_GPIOS);
@@ -1163,9 +1163,9 @@ int __init init_arch_irq(void)
 
 	for (irq = 0; irq <= SYS_IRQS; irq++) {
 		if (irq <= IRQ_CORETMR)
-			set_irq_chip(irq, &bfin_core_irqchip);
+			irq_set_chip(irq, &bfin_core_irqchip);
 		else
-			set_irq_chip(irq, &bfin_internal_irqchip);
+			irq_set_chip(irq, &bfin_internal_irqchip);
 
 		switch (irq) {
 #if defined(CONFIG_BF53x)
@@ -1189,50 +1189,50 @@ int __init init_arch_irq(void)
 #elif defined(CONFIG_BF538) || defined(CONFIG_BF539)
 		case IRQ_PORTF_INTA:
 #endif
-			set_irq_chained_handler(irq,
-						bfin_demux_gpio_irq);
+			irq_set_chained_handler(irq, bfin_demux_gpio_irq);
 			break;
 #ifdef BF537_GENERIC_ERROR_INT_DEMUX
 		case IRQ_GENERIC_ERROR:
-			set_irq_chained_handler(irq, bfin_demux_error_irq);
+			irq_set_chained_handler(irq, bfin_demux_error_irq);
 			break;
 #endif
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
 		case IRQ_MAC_ERROR:
-			set_irq_chained_handler(irq, bfin_demux_mac_status_irq);
+			irq_set_chained_handler(irq,
+						bfin_demux_mac_status_irq);
 			break;
 #endif
 #ifdef CONFIG_SMP
 		case IRQ_SUPPLE_0:
 		case IRQ_SUPPLE_1:
-			set_irq_handler(irq, handle_percpu_irq);
+			irq_set_handler(irq, handle_percpu_irq);
 			break;
 #endif
 
 #ifdef CONFIG_TICKSOURCE_CORETMR
 		case IRQ_CORETMR:
 # ifdef CONFIG_SMP
-			set_irq_handler(irq, handle_percpu_irq);
+			irq_set_handler(irq, handle_percpu_irq);
 			break;
 # else
-			set_irq_handler(irq, handle_simple_irq);
+			irq_set_handler(irq, handle_simple_irq);
 			break;
 # endif
 #endif
 
 #ifdef CONFIG_TICKSOURCE_GPTMR0
 		case IRQ_TIMER0:
-			set_irq_handler(irq, handle_simple_irq);
+			irq_set_handler(irq, handle_simple_irq);
 			break;
 #endif
 
 #ifdef CONFIG_IPIPE
 		default:
-			set_irq_handler(irq, handle_level_irq);
+			irq_set_handler(irq, handle_level_irq);
 			break;
 #else /* !CONFIG_IPIPE */
 		default:
-			set_irq_handler(irq, handle_simple_irq);
+			irq_set_handler(irq, handle_simple_irq);
 			break;
 #endif /* !CONFIG_IPIPE */
 		}
@@ -1240,22 +1240,22 @@ int __init init_arch_irq(void)
 
 #ifdef BF537_GENERIC_ERROR_INT_DEMUX
 	for (irq = IRQ_PPI_ERROR; irq <= IRQ_UART1_ERROR; irq++)
-		set_irq_chip_and_handler(irq, &bfin_generic_error_irqchip,
+		irq_set_chip_and_handler(irq, &bfin_generic_error_irqchip,
 					 handle_level_irq);
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
-	set_irq_chained_handler(IRQ_MAC_ERROR, bfin_demux_mac_status_irq);
+	irq_set_chained_handler(IRQ_MAC_ERROR, bfin_demux_mac_status_irq);
 #endif
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
 	for (irq = IRQ_MAC_PHYINT; irq <= IRQ_MAC_STMDONE; irq++)
-		set_irq_chip_and_handler(irq, &bfin_mac_status_irqchip,
+		irq_set_chip_and_handler(irq, &bfin_mac_status_irqchip,
 					 handle_level_irq);
 #endif
 	/* if configured as edge, then will be changed to do_edge_IRQ */
 	for (irq = GPIO_IRQ_BASE;
 		irq < (GPIO_IRQ_BASE + MAX_BLACKFIN_GPIOS); irq++)
-		set_irq_chip_and_handler(irq, &bfin_gpio_irqchip,
+		irq_set_chip_and_handler(irq, &bfin_gpio_irqchip,
 					 handle_level_irq);
 
 	bfin_write_IMASK(0);



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

* Re: [patch 0/2] blackfin: Final irq cleanup
  2011-03-25 13:32 [patch 0/2] blackfin: Final irq cleanup Thomas Gleixner
  2011-03-25 13:32 ` [patch 1/2] bfin: " Thomas Gleixner
  2011-03-25 13:32 ` [patch 2/2] bfin: Convert irq namespace Thomas Gleixner
@ 2011-03-25 21:17 ` Mike Frysinger
  2011-03-30  4:49   ` Mike Frysinger
  2 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2011-03-25 21:17 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, uclinux-dist-devel

On Fri, Mar 25, 2011 at 09:32, Thomas Gleixner wrote:
> this is the final cleanup and name space conversion, so that we can
> remove the deprecated code in the core.
>
> It would be nice to get this Linus wards for .39

does this require some other patch ?  a recent merge from another tree
broke Blackfin, so i need to push out stuff to Linus again anyways.
-mike

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

* Re: [patch 2/2] bfin: Convert irq namespace
  2011-03-25 13:32 ` [patch 2/2] bfin: Convert irq namespace Thomas Gleixner
@ 2011-03-25 21:34   ` Mike Frysinger
  2011-03-25 21:38     ` Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2011-03-25 21:34 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, uclinux-dist-devel

On Fri, Mar 25, 2011 at 09:32, Thomas Gleixner wrote:
> -       __set_irq_handler_unlocked(irq, handle);
> +       __irq_set_handler_locked(irq, handle);

looks like a typo in your patch ?  should still be unlocked right ?
-mike

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

* Re: [patch 2/2] bfin: Convert irq namespace
  2011-03-25 21:34   ` Mike Frysinger
@ 2011-03-25 21:38     ` Mike Frysinger
  2011-03-25 21:47       ` Thomas Gleixner
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2011-03-25 21:38 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, uclinux-dist-devel

On Fri, Mar 25, 2011 at 17:34, Mike Frysinger wrote:
> On Fri, Mar 25, 2011 at 09:32, Thomas Gleixner wrote:
>> -       __set_irq_handler_unlocked(irq, handle);
>> +       __irq_set_handler_locked(irq, handle);
>
> looks like a typo in your patch ?  should still be unlocked right ?

although that still doesnt fix the build failure for me ...

arch/blackfin/mach-common/ints-priority.c: In function ‘bfin_set_irq_handler’:
arch/blackfin/mach-common/ints-priority.c:562: error: implicit
declaration of function ‘__irq_set_handler_unlocked’
make[1]: *** [arch/blackfin/mach-common/ints-priority.o] Error 1
-mike

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

* Re: [patch 2/2] bfin: Convert irq namespace
  2011-03-25 21:38     ` Mike Frysinger
@ 2011-03-25 21:47       ` Thomas Gleixner
  2011-03-25 21:58         ` [uclinux-dist-devel] " Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Gleixner @ 2011-03-25 21:47 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: LKML, uclinux-dist-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 829 bytes --]


On Fri, 25 Mar 2011, Mike Frysinger wrote:

> On Fri, Mar 25, 2011 at 17:34, Mike Frysinger wrote:
> > On Fri, Mar 25, 2011 at 09:32, Thomas Gleixner wrote:
> >> -       __set_irq_handler_unlocked(irq, handle);
> >> +       __irq_set_handler_locked(irq, handle);
> >
> > looks like a typo in your patch ?  should still be unlocked right ?
> 
> although that still doesnt fix the build failure for me ...
> 
> arch/blackfin/mach-common/ints-priority.c: In function ‘bfin_set_irq_handler’:
> arch/blackfin/mach-common/ints-priority.c:562: error: implicit
> declaration of function ‘__irq_set_handler_unlocked’

Sorry the patch is correct, but it depends on a pending pull
request. I hope that hits linus tree tonight.

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git irq/urgent

Thanks,

	tglx


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

* Re: [uclinux-dist-devel] [patch 2/2] bfin: Convert irq namespace
  2011-03-25 21:47       ` Thomas Gleixner
@ 2011-03-25 21:58         ` Mike Frysinger
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2011-03-25 21:58 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: uclinux-dist-devel, LKML

On Fri, Mar 25, 2011 at 17:47, Thomas Gleixner wrote:
> On Fri, 25 Mar 2011, Mike Frysinger wrote:
>> On Fri, Mar 25, 2011 at 17:34, Mike Frysinger wrote:
>> > On Fri, Mar 25, 2011 at 09:32, Thomas Gleixner wrote:
>> >> -       __set_irq_handler_unlocked(irq, handle);
>> >> +       __irq_set_handler_locked(irq, handle);
>> >
>> > looks like a typo in your patch ?  should still be unlocked right ?
>>
>> although that still doesnt fix the build failure for me ...
>>
>> arch/blackfin/mach-common/ints-priority.c: In function ‘bfin_set_irq_handler’:
>> arch/blackfin/mach-common/ints-priority.c:562: error: implicit
>> declaration of function ‘__irq_set_handler_unlocked’
>
> Sorry the patch is correct, but it depends on a pending pull
> request. I hope that hits linus tree tonight.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git irq/urgent

OK, i'll look at the patches tomorrow then ;)
-mike

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

* Re: [patch 0/2] blackfin: Final irq cleanup
  2011-03-25 21:17 ` [patch 0/2] blackfin: Final irq cleanup Mike Frysinger
@ 2011-03-30  4:49   ` Mike Frysinger
  2011-03-30  8:32     ` Thomas Gleixner
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2011-03-30  4:49 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, uclinux-dist-devel

On Fri, Mar 25, 2011 at 17:17, Mike Frysinger wrote:
> On Fri, Mar 25, 2011 at 09:32, Thomas Gleixner wrote:
>> this is the final cleanup and name space conversion, so that we can
>> remove the deprecated code in the core.
>>
>> It would be nice to get this Linus wards for .39
>
> does this require some other patch ?  a recent merge from another tree
> broke Blackfin, so i need to push out stuff to Linus again anyways.

hmm, so i guess you just merged this through your own tree ?
-mike

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

* Re: [patch 0/2] blackfin: Final irq cleanup
  2011-03-30  4:49   ` Mike Frysinger
@ 2011-03-30  8:32     ` Thomas Gleixner
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Gleixner @ 2011-03-30  8:32 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: LKML, uclinux-dist-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 650 bytes --]

On Wed, 30 Mar 2011, Mike Frysinger wrote:

> On Fri, Mar 25, 2011 at 17:17, Mike Frysinger wrote:
> > On Fri, Mar 25, 2011 at 09:32, Thomas Gleixner wrote:
> >> this is the final cleanup and name space conversion, so that we can
> >> remove the deprecated code in the core.
> >>
> >> It would be nice to get this Linus wards for .39
> >
> > does this require some other patch ?  a recent merge from another tree
> > broke Blackfin, so i need to push out stuff to Linus again anyways.
> 
> hmm, so i guess you just merged this through your own tree ?

Yeah, we wanted to get rid of the core cruft, so we put all the
pending stuff in.

Thanks,

	tglx

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

end of thread, other threads:[~2011-03-30  8:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-25 13:32 [patch 0/2] blackfin: Final irq cleanup Thomas Gleixner
2011-03-25 13:32 ` [patch 1/2] bfin: " Thomas Gleixner
2011-03-25 13:32 ` [patch 2/2] bfin: Convert irq namespace Thomas Gleixner
2011-03-25 21:34   ` Mike Frysinger
2011-03-25 21:38     ` Mike Frysinger
2011-03-25 21:47       ` Thomas Gleixner
2011-03-25 21:58         ` [uclinux-dist-devel] " Mike Frysinger
2011-03-25 21:17 ` [patch 0/2] blackfin: Final irq cleanup Mike Frysinger
2011-03-30  4:49   ` Mike Frysinger
2011-03-30  8:32     ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®