All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/3] xtensa: Convert to new irq_chip functions
@ 2011-02-06 21:12 Thomas Gleixner
  2011-02-06 21:12 ` [patch 1/3] xtensa: Convert main irq_chip to new functions Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Gleixner @ 2011-02-06 21:12 UTC (permalink / raw)
  To: LKML; +Cc: Chris Zankel

The following series converts xtensa to the new irq_chip functions and
sets GENERIC_HARDIRQS_NO_DEPRECATED

Thanks,

	tglx




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

* [patch 1/3] xtensa: Convert main irq_chip to new functions
  2011-02-06 21:12 [patch 0/3] xtensa: Convert to new irq_chip functions Thomas Gleixner
@ 2011-02-06 21:12 ` Thomas Gleixner
  2011-02-06 21:12 ` [patch 2/3] xtensa: Convert s6000 gpio " Thomas Gleixner
  2011-02-06 21:12 ` [patch 3/3] xtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2011-02-06 21:12 UTC (permalink / raw)
  To: LKML; +Cc: Chris Zankel

[-- Attachment #1: xtensa-convert-irq-chip.patch --]
[-- Type: text/plain, Size: 2625 bytes --]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/xtensa/kernel/irq.c |   43 +++++++++++++++++++++----------------------
 1 file changed, 21 insertions(+), 22 deletions(-)

Index: linux-next/arch/xtensa/kernel/irq.c
===================================================================
--- linux-next.orig/arch/xtensa/kernel/irq.c
+++ linux-next/arch/xtensa/kernel/irq.c
@@ -35,7 +35,6 @@ atomic_t irq_err_count;
 asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
 {
 	struct pt_regs *old_regs = set_irq_regs(regs);
-	struct irq_desc *desc = irq_desc + irq;
 
 	if (irq >= NR_IRQS) {
 		printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
@@ -57,7 +56,7 @@ asmlinkage void do_IRQ(int irq, struct p
 			       sp - sizeof(struct thread_info));
 	}
 #endif
-	desc->handle_irq(irq, desc);
+	generic_handle_irq(irq);
 
 	irq_exit();
 	set_irq_regs(old_regs);
@@ -111,50 +110,50 @@ skip:
 	return 0;
 }
 
-static void xtensa_irq_mask(unsigned int irq)
+static void xtensa_irq_mask(struct irq_chip *d)
 {
-	cached_irq_mask &= ~(1 << irq);
+	cached_irq_mask &= ~(1 << d->irq);
 	set_sr (cached_irq_mask, INTENABLE);
 }
 
-static void xtensa_irq_unmask(unsigned int irq)
+static void xtensa_irq_unmask(struct irq_chip *d)
 {
-	cached_irq_mask |= 1 << irq;
+	cached_irq_mask |= 1 << d->irq;
 	set_sr (cached_irq_mask, INTENABLE);
 }
 
-static void xtensa_irq_enable(unsigned int irq)
+static void xtensa_irq_enable(struct irq_chip *d)
 {
-	variant_irq_enable(irq);
-	xtensa_irq_unmask(irq);
+	variant_irq_enable(d->irq);
+	xtensa_irq_unmask(d->irq);
 }
 
-static void xtensa_irq_disable(unsigned int irq)
+static void xtensa_irq_disable(struct irq_chip *d)
 {
-	xtensa_irq_mask(irq);
-	variant_irq_disable(irq);
+	xtensa_irq_mask(d->irq);
+	variant_irq_disable(d->irq);
 }
 
-static void xtensa_irq_ack(unsigned int irq)
+static void xtensa_irq_ack(struct irq_chip *d)
 {
-	set_sr(1 << irq, INTCLEAR);
+	set_sr(1 << d->irq, INTCLEAR);
 }
 
-static int xtensa_irq_retrigger(unsigned int irq)
+static int xtensa_irq_retrigger(struct irq_chip *d)
 {
-	set_sr (1 << irq, INTSET);
+	set_sr (1 << d->irq, INTSET);
 	return 1;
 }
 
 
 static struct irq_chip xtensa_irq_chip = {
 	.name		= "xtensa",
-	.enable		= xtensa_irq_enable,
-	.disable	= xtensa_irq_disable,
-	.mask		= xtensa_irq_mask,
-	.unmask		= xtensa_irq_unmask,
-	.ack		= xtensa_irq_ack,
-	.retrigger	= xtensa_irq_retrigger,
+	.irq_enable	= xtensa_irq_enable,
+	.irq_disable	= xtensa_irq_disable,
+	.irq_mask	= xtensa_irq_mask,
+	.irq_unmask	= xtensa_irq_unmask,
+	.irq_ack	= xtensa_irq_ack,
+	.irq_retrigger	= xtensa_irq_retrigger,
 };
 
 void __init init_IRQ(void)



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

* [patch 2/3] xtensa: Convert s6000 gpio irq_chip to new functions
  2011-02-06 21:12 [patch 0/3] xtensa: Convert to new irq_chip functions Thomas Gleixner
  2011-02-06 21:12 ` [patch 1/3] xtensa: Convert main irq_chip to new functions Thomas Gleixner
@ 2011-02-06 21:12 ` Thomas Gleixner
  2011-02-06 21:12 ` [patch 3/3] xtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2011-02-06 21:12 UTC (permalink / raw)
  To: LKML; +Cc: Chris Zankel

[-- Attachment #1: xtensa-convert-s6000-gpio.patch --]
[-- Type: text/plain, Size: 2580 bytes --]

Also use proper wrappers for irq_desc access.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/xtensa/variants/s6000/gpio.c |   27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

Index: linux-next/arch/xtensa/variants/s6000/gpio.c
===================================================================
--- linux-next.orig/arch/xtensa/variants/s6000/gpio.c
+++ linux-next/arch/xtensa/variants/s6000/gpio.c
@@ -85,30 +85,29 @@ int s6_gpio_init(u32 afsel)
 	return gpiochip_add(&gpiochip);
 }
 
-static void ack(unsigned int irq)
+static void ack(struct irq_data *d)
 {
-	writeb(1 << (irq - IRQ_BASE), S6_REG_GPIO + S6_GPIO_IC);
+	writeb(1 << (d->irq - IRQ_BASE), S6_REG_GPIO + S6_GPIO_IC);
 }
 
-static void mask(unsigned int irq)
+static void mask(struct irq_data *d)
 {
 	u8 r = readb(S6_REG_GPIO + S6_GPIO_IE);
-	r &= ~(1 << (irq - IRQ_BASE));
+	r &= ~(1 << (d->irq - IRQ_BASE));
 	writeb(r, S6_REG_GPIO + S6_GPIO_IE);
 }
 
-static void unmask(unsigned int irq)
+static void unmask(struct irq_data *d)
 {
 	u8 m = readb(S6_REG_GPIO + S6_GPIO_IE);
-	m |= 1 << (irq - IRQ_BASE);
+	m |= 1 << (d->irq - IRQ_BASE);
 	writeb(m, S6_REG_GPIO + S6_GPIO_IE);
 }
 
-static int set_type(unsigned int irq, unsigned int type)
+static int set_type(struct irq_data *d, unsigned int type)
 {
-	const u8 m = 1 << (irq - IRQ_BASE);
+	const u8 m = 1 << (d->irq - IRQ_BASE);
 	irq_flow_handler_t handler;
-	struct irq_desc *desc;
 	u8 reg;
 
 	if (type == IRQ_TYPE_PROBE) {
@@ -129,8 +128,7 @@ static int set_type(unsigned int irq, un
 		handler = handle_edge_irq;
 	}
 	writeb(reg, S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_IS);
-	desc = irq_to_desc(irq);
-	desc->handle_irq = handler;
+	__set_irq_handler_unlocked(irq, handler);
 
 	reg = readb(S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_IEV);
 	if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING))
@@ -160,12 +158,13 @@ static u8 demux_masks[4];
 
 static void demux_irqs(unsigned int irq, struct irq_desc *desc)
 {
+	struct irq_chip *chip = get_irq_desc_chip(desc);
 	u8 *mask = get_irq_desc_data(desc);
 	u8 pending;
 	int cirq;
 
-	desc->chip->mask(irq);
-	desc->chip->ack(irq);
+	chip->mask(&desc->irq_data);
+	chip->ack(&desc->irq_data));
 	pending = readb(S6_REG_GPIO + S6_GPIO_BANK(0) + S6_GPIO_MIS) & *mask;
 	cirq = IRQ_BASE - 1;
 	while (pending) {
@@ -174,7 +173,7 @@ static void demux_irqs(unsigned int irq,
 		pending >>= n;
 		generic_handle_irq(cirq);
 	}
-	desc->chip->unmask(irq);
+	chip->unmask(&desc->irq_data));
 }
 
 extern const signed char *platform_irq_mappings[XTENSA_NR_IRQS];



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

* [patch 3/3] xtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATED
  2011-02-06 21:12 [patch 0/3] xtensa: Convert to new irq_chip functions Thomas Gleixner
  2011-02-06 21:12 ` [patch 1/3] xtensa: Convert main irq_chip to new functions Thomas Gleixner
  2011-02-06 21:12 ` [patch 2/3] xtensa: Convert s6000 gpio " Thomas Gleixner
@ 2011-02-06 21:12 ` Thomas Gleixner
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2011-02-06 21:12 UTC (permalink / raw)
  To: LKML; +Cc: Chris Zankel

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

All chips converted.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/xtensa/Kconfig |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-next/arch/xtensa/Kconfig
===================================================================
--- linux-next.orig/arch/xtensa/Kconfig
+++ linux-next/arch/xtensa/Kconfig
@@ -7,6 +7,8 @@ config ZONE_DMA
 config XTENSA
 	def_bool y
 	select HAVE_IDE
+	select HAVE_GENERIC_HARDIRQS
+	select GENERIC_HARDIRQS_NO_DEPRECATED
 	help
 	  Xtensa processors are 32-bit RISC machines designed by Tensilica
 	  primarily for embedded systems.  These processors are both
@@ -24,9 +26,6 @@ config GENERIC_FIND_NEXT_BIT
 config GENERIC_HWEIGHT
 	def_bool y
 
-config GENERIC_HARDIRQS
-	def_bool y
-
 config GENERIC_GPIO
 	def_bool y
 



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

end of thread, other threads:[~2011-02-06 21:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 21:12 [patch 0/3] xtensa: Convert to new irq_chip functions Thomas Gleixner
2011-02-06 21:12 ` [patch 1/3] xtensa: Convert main irq_chip to new functions Thomas Gleixner
2011-02-06 21:12 ` [patch 2/3] xtensa: Convert s6000 gpio " Thomas Gleixner
2011-02-06 21:12 ` [patch 3/3] xtensa: Use generic IRQ Kconfig and set 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.