All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions
@ 2011-02-06 23:39 Thomas Gleixner
  2011-02-06 23:39 ` [patch 01/10] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

That's a conversion to the new irq_chips and a cleanup to irq_desc
accessor functions. Finally it sets GENERIC_HARDIRQS_NO_DEPRECATED.

Warning: untested.

Thanks,

	tglx




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

* [patch 01/10] m68knommu: 5772: Replace private irq flow handler
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-08  4:49   ` Greg Ungerer
  2011-02-08  4:52   ` Greg Ungerer
  2011-02-06 23:39 ` [patch 02/10] m68knommu Convert coldfire intc irq_chip to new functions Thomas Gleixner
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68knommu-5772-replace-private-irq-flow-handler.patch --]
[-- Type: text/plain, Size: 1054 bytes --]

That handler lacks the minimal checks for action being zero etc. Keep
the weird flow - ack before handling - intact and call into
handle_simple_irq which does the right thing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Greg Ungerer <gerg@uclinux.org>
LKML-Reference: <20110202212552.413849952@linutronix.de>
---
 arch/m68knommu/platform/5272/intc.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: linux-next/arch/m68knommu/platform/5272/intc.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/5272/intc.c
+++ linux-next/arch/m68knommu/platform/5272/intc.c
@@ -137,11 +137,8 @@ static int intc_irq_set_type(unsigned in
  */
 static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
 {
-	kstat_incr_irqs_this_cpu(irq, desc);
-	desc->status |= IRQ_INPROGRESS;
 	desc->chip->ack(irq);
-	handle_IRQ_event(irq, desc->action);
-	desc->status &= ~IRQ_INPROGRESS;
+	handle_simple_irq(irq, desc);
 }
 
 static struct irq_chip intc_irq_chip = {



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

* [patch 02/10] m68knommu Convert coldfire intc irq_chip to new functions
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
  2011-02-06 23:39 ` [patch 01/10] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-06 23:39 ` [patch 03/10] m68knommu: Convert coldfire intc-2 " Thomas Gleixner
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-convert-coldfire-intc.patch --]
[-- Type: text/plain, Size: 1370 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/platform/coldfire/intc.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Index: linux-next/arch/m68knommu/platform/coldfire/intc.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/coldfire/intc.c
+++ linux-next/arch/m68knommu/platform/coldfire/intc.c
@@ -111,28 +111,28 @@ void mcf_autovector(int irq)
 #endif
 }
 
-static void intc_irq_mask(unsigned int irq)
+static void intc_irq_mask(struct irq_data *d)
 {
-	if (mcf_irq2imr[irq])
-		mcf_setimr(mcf_irq2imr[irq]);
+	if (mcf_irq2imr[d->irq])
+		mcf_setimr(mcf_irq2imr[d->irq]);
 }
 
-static void intc_irq_unmask(unsigned int irq)
+static void intc_irq_unmask(struct irq_data *d)
 {
-	if (mcf_irq2imr[irq])
-		mcf_clrimr(mcf_irq2imr[irq]);
+	if (mcf_irq2imr[d->irq])
+		mcf_clrimr(mcf_irq2imr[d->irq]);
 }
 
-static int intc_irq_set_type(unsigned int irq, unsigned int type)
+static int intc_irq_set_type(struct irq_data *d, unsigned int type)
 {
 	return 0;
 }
 
 static struct irq_chip intc_irq_chip = {
 	.name		= "CF-INTC",
-	.mask		= intc_irq_mask,
-	.unmask		= intc_irq_unmask,
-	.set_type	= intc_irq_set_type,
+	.irq_mask	= intc_irq_mask,
+	.irq_unmask	= intc_irq_unmask,
+	.irq_set_type	= intc_irq_set_type,
 };
 
 void __init init_IRQ(void)



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

* [patch 03/10] m68knommu: Convert coldfire intc-2 irq_chip to new functions
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
  2011-02-06 23:39 ` [patch 01/10] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
  2011-02-06 23:39 ` [patch 02/10] m68knommu Convert coldfire intc irq_chip to new functions Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-06 23:39 ` [patch 04/10] m68knommu: Convert coldfire intc-simr " Thomas Gleixner
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-convert-coldfire-intc2.patch --]
[-- Type: text/plain, Size: 1600 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/platform/coldfire/intc-2.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

Index: linux-next/arch/m68knommu/platform/coldfire/intc-2.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/coldfire/intc-2.c
+++ linux-next/arch/m68knommu/platform/coldfire/intc-2.c
@@ -43,8 +43,10 @@ static u8 intc_intpri = MCFSIM_ICR_LEVEL
 #define NR_VECS	64
 #endif
 
-static void intc_irq_mask(unsigned int irq)
+static void intc_irq_mask(struct irq_data *d)
 {
+	unsigned int irq = d->irq;
+
 	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECBASE + NR_VECS)) {
 		unsigned long imraddr;
 		u32 val, imrbit;
@@ -64,8 +66,10 @@ static void intc_irq_mask(unsigned int i
 	}
 }
 
-static void intc_irq_unmask(unsigned int irq)
+static void intc_irq_unmask(struct irq_data *d)
 {
+	unsigned int irq = d->irq;
+
 	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECBASE + NR_VECS)) {
 		unsigned long intaddr, imraddr, icraddr;
 		u32 val, imrbit;
@@ -93,16 +97,16 @@ static void intc_irq_unmask(unsigned int
 	}
 }
 
-static int intc_irq_set_type(unsigned int irq, unsigned int type)
+static int intc_irq_set_type(struct irq_data *d, unsigned int type)
 {
 	return 0;
 }
 
 static struct irq_chip intc_irq_chip = {
 	.name		= "CF-INTC",
-	.mask		= intc_irq_mask,
-	.unmask		= intc_irq_unmask,
-	.set_type	= intc_irq_set_type,
+	.irq_mask	= intc_irq_mask,
+	.irq_unmask	= intc_irq_unmask,
+	.irq_set_type	= intc_irq_set_type,
 };
 
 void __init init_IRQ(void)



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

* [patch 04/10] m68knommu: Convert coldfire intc-simr irq_chip to new functions
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
                   ` (2 preceding siblings ...)
  2011-02-06 23:39 ` [patch 03/10] m68knommu: Convert coldfire intc-2 " Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-06 23:39 ` [patch 05/10] m68knommu: Convert 68328 ints " Thomas Gleixner
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-convert-coldfire-intc-simr.patch --]
[-- Type: text/plain, Size: 1782 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/platform/coldfire/intc-simr.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Index: linux-next/arch/m68knommu/platform/coldfire/intc-simr.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/coldfire/intc-simr.c
+++ linux-next/arch/m68knommu/platform/coldfire/intc-simr.c
@@ -20,8 +20,10 @@
 #include <asm/mcfsim.h>
 #include <asm/traps.h>
 
-static void intc_irq_mask(unsigned int irq)
+static void intc_irq_mask(struct irq_data *d)
 {
+	unsigned int irq = d->irq;
+
 	if (irq >= MCFINT_VECBASE) {
 		if (irq < MCFINT_VECBASE + 64)
 			__raw_writeb(irq - MCFINT_VECBASE, MCFINTC0_SIMR);
@@ -30,8 +32,10 @@ static void intc_irq_mask(unsigned int i
 	}
 }
 
-static void intc_irq_unmask(unsigned int irq)
+static void intc_irq_unmask(struct irq_data *d)
 {
+	unsigned int irq = d->irq;
+
 	if (irq >= MCFINT_VECBASE) {
 		if (irq < MCFINT_VECBASE + 64)
 			__raw_writeb(irq - MCFINT_VECBASE, MCFINTC0_CIMR);
@@ -40,8 +44,10 @@ static void intc_irq_unmask(unsigned int
 	}
 }
 
-static int intc_irq_set_type(unsigned int irq, unsigned int type)
+static int intc_irq_set_type(struct irq_data *d, unsigned int type)
 {
+	unsigned int irq = d->irq;
+
 	if (irq >= MCFINT_VECBASE) {
 		if (irq < MCFINT_VECBASE + 64)
 			__raw_writeb(5, MCFINTC0_ICR0 + irq - MCFINT_VECBASE);
@@ -53,9 +59,9 @@ static int intc_irq_set_type(unsigned in
 
 static struct irq_chip intc_irq_chip = {
 	.name		= "CF-INTC",
-	.mask		= intc_irq_mask,
-	.unmask		= intc_irq_unmask,
-	.set_type	= intc_irq_set_type,
+	.irq_mask	= intc_irq_mask,
+	.irq_unmask	= intc_irq_unmask,
+	.irq_set_type	= intc_irq_set_type,
 };
 
 void __init init_IRQ(void)



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

* [patch 05/10] m68knommu: Convert 68328 ints irq_chip to new functions
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
                   ` (3 preceding siblings ...)
  2011-02-06 23:39 ` [patch 04/10] m68knommu: Convert coldfire intc-simr " Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-06 23:39 ` [patch 06/10] m68knommu: Convert 68360 " Thomas Gleixner
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-convert-68328-ints.patch --]
[-- Type: text/plain, Size: 956 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/platform/68328/ints.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: linux-next/arch/m68knommu/platform/68328/ints.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/68328/ints.c
+++ linux-next/arch/m68knommu/platform/68328/ints.c
@@ -135,20 +135,20 @@ void process_int(int vec, struct pt_regs
 	}
 }
 
-static void intc_irq_unmask(unsigned int irq)
+static void intc_irq_unmask(struct irq_data *d)
 {
-	IMR &= ~(1<<irq);
+	IMR &= ~(1 << d->irq);
 }
 
-static void intc_irq_mask(unsigned int irq)
+static void intc_irq_mask(struct irq_data *d)
 {
-	IMR |= (1<<irq);
+	IMR |= (1 << d->irq);
 }
 
 static struct irq_chip intc_irq_chip = {
 	.name		= "M68K-INTC",
-	.mask		= intc_irq_mask,
-	.unmask		= intc_irq_unmask,
+	.irq_mask	= intc_irq_mask,
+	.irq_unmask	= intc_irq_unmask,
 };
 
 /*



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

* [patch 06/10] m68knommu: Convert 68360 ints irq_chip to new functions
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
                   ` (4 preceding siblings ...)
  2011-02-06 23:39 ` [patch 05/10] m68knommu: Convert 68328 ints " Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-06 23:39 ` [patch 07/10] m68knommu: Convert 5272 intc " Thomas Gleixner
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-convert-68360-ints.patch --]
[-- Type: text/plain, Size: 1294 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/platform/68360/ints.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Index: linux-next/arch/m68knommu/platform/68360/ints.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/68360/ints.c
+++ linux-next/arch/m68knommu/platform/68360/ints.c
@@ -37,26 +37,26 @@ extern void *_ramvec[];
 /* The number of spurious interrupts */
 volatile unsigned int num_spurious;
 
-static void intc_irq_unmask(unsigned int irq)
+static void intc_irq_unmask(struct irq_data *d)
 {
-	pquicc->intr_cimr |= (1 << irq);
+	pquicc->intr_cimr |= (1 << d->irq);
 }
 
-static void intc_irq_mask(unsigned int irq)
+static void intc_irq_mask(struct irq_data *d)
 {
-	pquicc->intr_cimr &= ~(1 << irq);
+	pquicc->intr_cimr &= ~(1 << d->irq);
 }
 
-static void intc_irq_ack(unsigned int irq)
+static void intc_irq_ack(struct irq_data *d)
 {
-	pquicc->intr_cisr = (1 << irq);
+	pquicc->intr_cisr = (1 << d->irq);
 }
 
 static struct irq_chip intc_irq_chip = {
 	.name		= "M68K-INTC",
-	.mask		= intc_irq_mask,
-	.unmask		= intc_irq_unmask,
-	.ack		= intc_irq_ack,
+	.irq_mask	= intc_irq_mask,
+	.irq_unmask	= intc_irq_unmask,
+	.irq_ack	= intc_irq_ack,
 };
 
 /*



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

* [patch 07/10] m68knommu: Convert 5272 intc irq_chip to new functions
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
                   ` (5 preceding siblings ...)
  2011-02-06 23:39 ` [patch 06/10] m68knommu: Convert 68360 " Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-08  3:24   ` Greg Ungerer
  2011-02-06 23:39 ` [patch 08/10] m68knommu Convert 5249 " Thomas Gleixner
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-convert-5272-intc.patch --]
[-- Type: text/plain, Size: 2433 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/platform/5272/intc.c |   28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

Index: linux-next/arch/m68knommu/platform/5272/intc.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/5272/intc.c
+++ linux-next/arch/m68knommu/platform/5272/intc.c
@@ -78,8 +78,10 @@ static struct irqmap intc_irqmap[MCFINT_
  * an interrupt on this irq (for the external irqs). So this mask function
  * is also an ack_mask function.
  */
-static void intc_irq_mask(unsigned int irq)
+static void intc_irq_mask(struct irq_data *d)
 {
+	unsigned int irq = d->irq;
+
 	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
 		u32 v;
 		irq -= MCFINT_VECBASE;
@@ -88,8 +90,10 @@ static void intc_irq_mask(unsigned int i
 	}
 }
 
-static void intc_irq_unmask(unsigned int irq)
+static void intc_irq_unmask(struct irq_data *d)
 {
+	unsigned int irq = d->irq;
+
 	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
 		u32 v;
 		irq -= MCFINT_VECBASE;
@@ -98,8 +102,10 @@ static void intc_irq_unmask(unsigned int
 	}
 }
 
-static void intc_irq_ack(unsigned int irq)
+static void intc_irq_ack(struct irq_data *d)
 {
+	unsigned int irq = d->irq;
+
 	/* Only external interrupts are acked */
 	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
 		irq -= MCFINT_VECBASE;
@@ -113,8 +119,10 @@ static void intc_irq_ack(unsigned int ir
 	}
 }
 
-static int intc_irq_set_type(unsigned int irq, unsigned int type)
+static int intc_irq_set_type(struct irq_data *d, unsigned int type)
 {
+	unsigned int irq = d->irq;
+
 	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
 		irq -= MCFINT_VECBASE;
 		if (intc_irqmap[irq].ack) {
@@ -137,17 +145,17 @@ static int intc_irq_set_type(unsigned in
  */
 static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
 {
-	desc->chip->ack(irq);
+	get_irq_desc_chip(i)->irq_ack(desc->irq_data);
 	handle_simple_irq(irq, desc);
 }
 
 static struct irq_chip intc_irq_chip = {
 	.name		= "CF-INTC",
-	.mask		= intc_irq_mask,
-	.unmask		= intc_irq_unmask,
-	.mask_ack	= intc_irq_mask,
-	.ack		= intc_irq_ack,
-	.set_type	= intc_irq_set_type,
+	.irq_mask	= intc_irq_mask,
+	.irq_unmask	= intc_irq_unmask,
+	.irq_mask_ack	= intc_irq_mask,
+	.irq_ack	= intc_irq_ack,
+	.irq_set_type	= intc_irq_set_type,
 };
 
 void __init init_IRQ(void)



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

* [patch 08/10] m68knommu Convert 5249 intc irq_chip to new functions
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
                   ` (6 preceding siblings ...)
  2011-02-06 23:39 ` [patch 07/10] m68knommu: Convert 5272 intc " Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-06 23:39 ` [patch 09/10] m68knommu: Use proper irq_desc accessors in show_interrupts() Thomas Gleixner
  2011-02-06 23:39 ` [patch 10/10] m68knommu: Select GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-convert-5249-intc.patch --]
[-- Type: text/plain, Size: 2031 bytes --]

/me idly wonders what sets the handlers for this chip.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/platform/5249/intc2.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Index: linux-next/arch/m68knommu/platform/5249/intc2.c
===================================================================
--- linux-next.orig/arch/m68knommu/platform/5249/intc2.c
+++ linux-next/arch/m68knommu/platform/5249/intc2.c
@@ -17,32 +17,32 @@
 #include <asm/coldfire.h>
 #include <asm/mcfsim.h>
 
-static void intc2_irq_gpio_mask(unsigned int irq)
+static void intc2_irq_gpio_mask(struct irq_data *d)
 {
 	u32 imr;
 	imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
-	imr &= ~(0x1 << (irq - MCFINTC2_GPIOIRQ0));
+	imr &= ~(0x1 << (d->irq - MCFINTC2_GPIOIRQ0));
 	writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
 }
 
-static void intc2_irq_gpio_unmask(unsigned int irq)
+static void intc2_irq_gpio_unmask(struct irq_data *d)
 {
 	u32 imr;
 	imr = readl(MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
-	imr |= (0x1 << (irq - MCFINTC2_GPIOIRQ0));
+	imr |= (0x1 << (d->irq - MCFINTC2_GPIOIRQ0));
 	writel(imr, MCF_MBAR2 + MCFSIM2_GPIOINTENABLE);
 }
 
-static void intc2_irq_gpio_ack(unsigned int irq)
+static void intc2_irq_gpio_ack(struct irq_data *d)
 {
-	writel(0x1 << (irq - MCFINTC2_GPIOIRQ0), MCF_MBAR2 + MCFSIM2_GPIOINTCLEAR);
+	writel(0x1 << (d->irq - MCFINTC2_GPIOIRQ0), MCF_MBAR2 + MCFSIM2_GPIOINTCLEAR);
 }
 
 static struct irq_chip intc2_irq_gpio_chip = {
 	.name		= "CF-INTC2",
-	.mask		= intc2_irq_gpio_mask,
-	.unmask		= intc2_irq_gpio_unmask,
-	.ack		= intc2_irq_gpio_ack,
+	.irq_mask	= intc2_irq_gpio_mask,
+	.irq_unmask	= intc2_irq_gpio_unmask,
+	.irq_ack	= intc2_irq_gpio_ack,
 };
 
 static int __init mcf_intc2_init(void)
@@ -51,7 +51,7 @@ static int __init mcf_intc2_init(void)
 
 	/* GPIO interrupt sources */
 	for (irq = MCFINTC2_GPIOIRQ0; (irq <= MCFINTC2_GPIOIRQ7); irq++)
-		irq_desc[irq].chip = &intc2_irq_gpio_chip;
+		set_irq_chip(irq, &intc2_irq_gpio_chip);
 
 	return 0;
 }



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

* [patch 09/10] m68knommu: Use proper irq_desc accessors in show_interrupts()
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
                   ` (7 preceding siblings ...)
  2011-02-06 23:39 ` [patch 08/10] m68knommu Convert 5249 " Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  2011-02-06 23:39 ` [patch 10/10] m68knommu: Select GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-nommu-use-proper-irq-desc-accessors.patch --]
[-- Type: text/plain, Size: 864 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/kernel/irq.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-next/arch/m68knommu/kernel/irq.c
===================================================================
--- linux-next.orig/arch/m68knommu/kernel/irq.c
+++ linux-next/arch/m68knommu/kernel/irq.c
@@ -38,11 +38,13 @@ int show_interrupts(struct seq_file *p, 
 		seq_puts(p, "           CPU0\n");
 
 	if (irq < NR_IRQS) {
-		ap = irq_desc[irq].action;
+		struct irq_desc *desc = irq_to_desc(irq);
+
+		ap = desc->action;
 		if (ap) {
 			seq_printf(p, "%3d: ", irq);
 			seq_printf(p, "%10u ", kstat_irqs(irq));
-			seq_printf(p, "%14s  ", irq_desc[irq].chip->name);
+			seq_printf(p, "%14s  ", get_irq_desc_chip(desc)->name);
 
 			seq_printf(p, "%s", ap->name);
 			for (ap = ap->next; ap; ap = ap->next)



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

* [patch 10/10] m68knommu: Select GENERIC_HARDIRQS_NO_DEPRECATED
  2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
                   ` (8 preceding siblings ...)
  2011-02-06 23:39 ` [patch 09/10] m68knommu: Use proper irq_desc accessors in show_interrupts() Thomas Gleixner
@ 2011-02-06 23:39 ` Thomas Gleixner
  9 siblings, 0 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-06 23:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Ungerer

[-- Attachment #1: m68k-set-nodepr.patch --]
[-- Type: text/plain, Size: 521 bytes --]

All chips converted and proper accessor functions used.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68knommu/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Index: linux-next/arch/m68knommu/Kconfig
===================================================================
--- linux-next.orig/arch/m68knommu/Kconfig
+++ linux-next/arch/m68knommu/Kconfig
@@ -3,6 +3,7 @@ config M68K
 	default y
 	select HAVE_IDE
 	select HAVE_GENERIC_HARDIRQS
+	select GENERIC_HARDIRQS_NO_DEPRECATED
 
 config MMU
 	bool



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

* Re: [patch 07/10] m68knommu: Convert 5272 intc irq_chip to new functions
  2011-02-06 23:39 ` [patch 07/10] m68knommu: Convert 5272 intc " Thomas Gleixner
@ 2011-02-08  3:24   ` Greg Ungerer
  2011-02-08  9:48     ` Thomas Gleixner
  0 siblings, 1 reply; 16+ messages in thread
From: Greg Ungerer @ 2011-02-08  3:24 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Greg Ungerer


Hi Thomas,

On 07/02/11 09:39, Thomas Gleixner wrote:
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>  arch/m68knommu/platform/5272/intc.c |   28 ++++++++++++++++++----------
>  1 file changed, 18 insertions(+), 10 deletions(-)
>
> Index: linux-next/arch/m68knommu/platform/5272/intc.c
> ===================================================================
> --- linux-next.orig/arch/m68knommu/platform/5272/intc.c
> +++ linux-next/arch/m68knommu/platform/5272/intc.c
> @@ -78,8 +78,10 @@ static struct irqmap intc_irqmap[MCFINT_
>   * an interrupt on this irq (for the external irqs). So this mask function
>   * is also an ack_mask function.
>   */
> -static void intc_irq_mask(unsigned int irq)
> +static void intc_irq_mask(struct irq_data *d)
>  {
> +	unsigned int irq = d->irq;
> +
>  	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
>  		u32 v;
>  		irq -= MCFINT_VECBASE;
> @@ -88,8 +90,10 @@ static void intc_irq_mask(unsigned int i
>  	}
>  }
>
> -static void intc_irq_unmask(unsigned int irq)
> +static void intc_irq_unmask(struct irq_data *d)
>  {
> +	unsigned int irq = d->irq;
> +
>  	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
>  		u32 v;
>  		irq -= MCFINT_VECBASE;
> @@ -98,8 +102,10 @@ static void intc_irq_unmask(unsigned int
>  	}
>  }
>
> -static void intc_irq_ack(unsigned int irq)
> +static void intc_irq_ack(struct irq_data *d)
>  {
> +	unsigned int irq = d->irq;
> +
>  	/* Only external interrupts are acked */
>  	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
>  		irq -= MCFINT_VECBASE;
> @@ -113,8 +119,10 @@ static void intc_irq_ack(unsigned int ir
>  	}
>  }
>
> -static int intc_irq_set_type(unsigned int irq, unsigned int type)
> +static int intc_irq_set_type(struct irq_data *d, unsigned int type)
>  {
> +	unsigned int irq = d->irq;
> +
>  	if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
>  		irq -= MCFINT_VECBASE;
>  		if (intc_irqmap[irq].ack) {
> @@ -137,17 +145,17 @@ static int intc_irq_set_type(unsigned in
>   */
>  static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
>  {
> -	desc->chip->ack(irq);
> +	get_irq_desc_chip(i)->irq_ack(desc->irq_data);
                          ^^^         ^^^
should this be:

         get_irq_desc_chip(desc)->irq_ack(&desc->irq_data)

I can't runtime test this right at the moment, but otherwise:

Acked-by: Greg Ungerer <gerg@uclinux.org>

Regards
Greg



>  	handle_simple_irq(irq, desc);
>  }
>
>  static struct irq_chip intc_irq_chip = {
>  	.name		= "CF-INTC",
> -	.mask		= intc_irq_mask,
> -	.unmask		= intc_irq_unmask,
> -	.mask_ack	= intc_irq_mask,
> -	.ack		= intc_irq_ack,
> -	.set_type	= intc_irq_set_type,
> +	.irq_mask	= intc_irq_mask,
> +	.irq_unmask	= intc_irq_unmask,
> +	.irq_mask_ack	= intc_irq_mask,
> +	.irq_ack	= intc_irq_ack,
> +	.irq_set_type	= intc_irq_set_type,
>  };
>
>  void __init init_IRQ(void)

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

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

* Re: [patch 01/10] m68knommu: 5772: Replace private irq flow handler
  2011-02-06 23:39 ` [patch 01/10] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
@ 2011-02-08  4:49   ` Greg Ungerer
  2011-02-08  4:52   ` Greg Ungerer
  1 sibling, 0 replies; 16+ messages in thread
From: Greg Ungerer @ 2011-02-08  4:49 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Greg Ungerer

Hi Thomas,

On 07/02/11 09:39, Thomas Gleixner wrote:
> That's a conversion to the new irq_chips and a cleanup to irq_desc
> accessor functions. Finally it sets GENERIC_HARDIRQS_NO_DEPRECATED.
>
> Warning: untested.

I am fine with all of these, so:

Acked-by: Greg Ungerer <gerg@uclinux.org>

I compile tested to cover all changes, only fix was to patch 7
(as noted in reply to that patch). I can't run test to cover
all changes right at the moment, but on the one board I can try
it ran with no problems.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

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

* Re: [patch 01/10] m68knommu: 5772: Replace private irq flow handler
  2011-02-06 23:39 ` [patch 01/10] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
  2011-02-08  4:49   ` Greg Ungerer
@ 2011-02-08  4:52   ` Greg Ungerer
  1 sibling, 0 replies; 16+ messages in thread
From: Greg Ungerer @ 2011-02-08  4:52 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Greg Ungerer


Hi Thomas,

On 07/02/11 09:39, Thomas Gleixner wrote:
> That handler lacks the minimal checks for action being zero etc. Keep
> the weird flow - ack before handling - intact and call into
> handle_simple_irq which does the right thing.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Acked-by: Greg Ungerer <gerg@uclinux.org>
> LKML-Reference: <20110202212552.413849952@linutronix.de>

Nitpick, the title should read "5272" not "5772".

Regards
Greg


> ---
>  arch/m68knommu/platform/5272/intc.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> Index: linux-next/arch/m68knommu/platform/5272/intc.c
> ===================================================================
> --- linux-next.orig/arch/m68knommu/platform/5272/intc.c
> +++ linux-next/arch/m68knommu/platform/5272/intc.c
> @@ -137,11 +137,8 @@ static int intc_irq_set_type(unsigned in
>   */
>  static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
>  {
> -	kstat_incr_irqs_this_cpu(irq, desc);
> -	desc->status |= IRQ_INPROGRESS;
>  	desc->chip->ack(irq);
> -	handle_IRQ_event(irq, desc->action);
> -	desc->status &= ~IRQ_INPROGRESS;
> +	handle_simple_irq(irq, desc);
>  }
>
>  static struct irq_chip intc_irq_chip = {

-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

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

* Re: [patch 07/10] m68knommu: Convert 5272 intc irq_chip to new functions
  2011-02-08  3:24   ` Greg Ungerer
@ 2011-02-08  9:48     ` Thomas Gleixner
  2011-02-08 10:03       ` Greg Ungerer
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-02-08  9:48 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: LKML, Greg Ungerer

On Tue, 8 Feb 2011, Greg Ungerer wrote:
> >  static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
> >  {
> > -	desc->chip->ack(irq);
> > +	get_irq_desc_chip(i)->irq_ack(desc->irq_data);
>                          ^^^         ^^^
> should this be:
> 
>         get_irq_desc_chip(desc)->irq_ack(&desc->irq_data)

Yes.
 
> I can't runtime test this right at the moment, but otherwise:
> 
> Acked-by: Greg Ungerer <gerg@uclinux.org>

Can you push that stuff linus wards for 39 or want me to do it ? It
has no dependencies whatsoever.

Thanks,

	tglx



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

* Re: [patch 07/10] m68knommu: Convert 5272 intc irq_chip to new functions
  2011-02-08  9:48     ` Thomas Gleixner
@ 2011-02-08 10:03       ` Greg Ungerer
  0 siblings, 0 replies; 16+ messages in thread
From: Greg Ungerer @ 2011-02-08 10:03 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Greg Ungerer


Hi Thomas,

On 08/02/11 19:48, Thomas Gleixner wrote:
> On Tue, 8 Feb 2011, Greg Ungerer wrote:
>>>   static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
>>>   {
>>> -	desc->chip->ack(irq);
>>> +	get_irq_desc_chip(i)->irq_ack(desc->irq_data);
>>                           ^^^         ^^^
>> should this be:
>>
>>          get_irq_desc_chip(desc)->irq_ack(&desc->irq_data)
>
> Yes.
>
>> I can't runtime test this right at the moment, but otherwise:
>>
>> Acked-by: Greg Ungerer<gerg@uclinux.org>
>
> Can you push that stuff linus wards for 39 or want me to do it ? It
> has no dependencies whatsoever.

I am happy to push this for 39.

Thanks
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

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

end of thread, other threads:[~2011-02-08 10:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
2011-02-06 23:39 ` [patch 01/10] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
2011-02-08  4:49   ` Greg Ungerer
2011-02-08  4:52   ` Greg Ungerer
2011-02-06 23:39 ` [patch 02/10] m68knommu Convert coldfire intc irq_chip to new functions Thomas Gleixner
2011-02-06 23:39 ` [patch 03/10] m68knommu: Convert coldfire intc-2 " Thomas Gleixner
2011-02-06 23:39 ` [patch 04/10] m68knommu: Convert coldfire intc-simr " Thomas Gleixner
2011-02-06 23:39 ` [patch 05/10] m68knommu: Convert 68328 ints " Thomas Gleixner
2011-02-06 23:39 ` [patch 06/10] m68knommu: Convert 68360 " Thomas Gleixner
2011-02-06 23:39 ` [patch 07/10] m68knommu: Convert 5272 intc " Thomas Gleixner
2011-02-08  3:24   ` Greg Ungerer
2011-02-08  9:48     ` Thomas Gleixner
2011-02-08 10:03       ` Greg Ungerer
2011-02-06 23:39 ` [patch 08/10] m68knommu Convert 5249 " Thomas Gleixner
2011-02-06 23:39 ` [patch 09/10] m68knommu: Use proper irq_desc accessors in show_interrupts() Thomas Gleixner
2011-02-06 23:39 ` [patch 10/10] m68knommu: Select GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner

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.