All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-08 18:14 ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-08 18:14 UTC (permalink / raw)
  To: LKML
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
===================================================================
--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
===================================================================
--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
===================================================================
--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif
-
 void early_init_irq_lock_class(void)
 {
 	struct irq_desc *desc;



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

* [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-08 18:14 ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-08 18:14 UTC (permalink / raw)
  To: LKML
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

[-- Attachment #1: genirq-troll-patch.patch --]
[-- Type: text/plain, Size: 9025 bytes --]

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
===================================================================
--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
===================================================================
--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
===================================================================
--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif
-
 void early_init_irq_lock_class(void)
 {
 	struct irq_desc *desc;



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

* [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 18:14 ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-08 18:14 UTC (permalink / raw)
  To: LKML
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
=================================--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
=================================--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
=================================--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
=================================--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif
-
 void early_init_irq_lock_class(void)
 {
 	struct irq_desc *desc;



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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
@ 2010-09-08 18:51   ` James Bottomley
  -1 siblings, 0 replies; 59+ messages in thread
From: James Bottomley @ 2010-09-08 18:51 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> plain text document attachment (genirq-troll-patch.patch)
> __do_IRQ() has been deprecated after a two years migration phase in
> commit 0e57aa1. Since then another 18 month have gone by.
> 
> So here's the status three and a half years after the flow based
> infrastructure was merged:
> 
>  The following architectures are fully converted to the new flow
>  handler code:
> 
>   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
>   sparc 64bit, tile, x86, xtensa
> 
>   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
>   though)
> 
>  The following architectures are not using the generic interrupt
>  infrastructure at all and are therefor unaffected:
> 
>   s390, m68k, sparc 32bit
> 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 
> Removing it would be the right thing, but that'll break 8 archs, so
> it's probably not considered a good idea, though for most of them the
> conversion should be reasonably trivial.
> 
> I'm happy to move that code into kernel/irq/cruft.c forever if there
> is no way to get the remaining users converted in the forseeable
> future. It looks like they can cope with the annoying build warning
> nicely.

Well, if you're going to deprecate something that 8 architectures rely
on, it would be nice to tell people ... or even just linux-arch ... most
of us do read that.  I've actually never noticed the warning the commit
activated in any of my parisc compiles for some reason.

> Either that or moving everything what breaks into staging/arch/* and
> hand it over to GregKH :)
> 
> Thoughts ?

We could move x86 into staging while it tries out the replacement ...

James

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 18:51   ` James Bottomley
  0 siblings, 0 replies; 59+ messages in thread
From: James Bottomley @ 2010-09-08 18:51 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> plain text document attachment (genirq-troll-patch.patch)
> __do_IRQ() has been deprecated after a two years migration phase in
> commit 0e57aa1. Since then another 18 month have gone by.
> 
> So here's the status three and a half years after the flow based
> infrastructure was merged:
> 
>  The following architectures are fully converted to the new flow
>  handler code:
> 
>   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
>   sparc 64bit, tile, x86, xtensa
> 
>   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
>   though)
> 
>  The following architectures are not using the generic interrupt
>  infrastructure at all and are therefor unaffected:
> 
>   s390, m68k, sparc 32bit
> 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 
> Removing it would be the right thing, but that'll break 8 archs, so
> it's probably not considered a good idea, though for most of them the
> conversion should be reasonably trivial.
> 
> I'm happy to move that code into kernel/irq/cruft.c forever if there
> is no way to get the remaining users converted in the forseeable
> future. It looks like they can cope with the annoying build warning
> nicely.

Well, if you're going to deprecate something that 8 architectures rely
on, it would be nice to tell people ... or even just linux-arch ... most
of us do read that.  I've actually never noticed the warning the commit
activated in any of my parisc compiles for some reason.

> Either that or moving everything what breaks into staging/arch/* and
> hand it over to GregKH :)
> 
> Thoughts ?

We could move x86 into staging while it tries out the replacement ...

James



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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
@ 2010-09-08 18:58   ` Kyle McMartin
  -1 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-08 18:58 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, Sep 08, 2010 at 06:14:14PM -0000, Thomas Gleixner wrote:
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 

Thanks Thomas for the reminder, I'll poke at fixing parisc this week,
and maybe try to fix ia64 and alpha too as penance for forgetting about
this for so long.

--Kyle

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 18:58   ` Kyle McMartin
  0 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-08 18:58 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, Sep 08, 2010 at 06:14:14PM -0000, Thomas Gleixner wrote:
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 

Thanks Thomas for the reminder, I'll poke at fixing parisc this week,
and maybe try to fix ia64 and alpha too as penance for forgetting about
this for so long.

--Kyle

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:51   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing James Bottomley
@ 2010-09-08 19:34     ` Thomas Gleixner
  -1 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-08 19:34 UTC (permalink / raw)
  To: James Bottomley
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 8 Sep 2010, James Bottomley wrote:
> On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> > plain text document attachment (genirq-troll-patch.patch)
> > __do_IRQ() has been deprecated after a two years migration phase in
> > commit 0e57aa1. Since then another 18 month have gone by.
> > 
> > So here's the status three and a half years after the flow based
> > infrastructure was merged:
> > 
> >  The following architectures are fully converted to the new flow
> >  handler code:
> > 
> >   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
> >   sparc 64bit, tile, x86, xtensa
> > 
> >   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> >   though)
> > 
> >  The following architectures are not using the generic interrupt
> >  infrastructure at all and are therefor unaffected:
> > 
> >   s390, m68k, sparc 32bit
> > 
> >  The following architectures are still using __do_IRQ():
> > 
> >   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> > 
> > So now the question arises what to do with __do_IRQ().
> > 
> > Removing it would be the right thing, but that'll break 8 archs, so
> > it's probably not considered a good idea, though for most of them the
> > conversion should be reasonably trivial.
> > 
> > I'm happy to move that code into kernel/irq/cruft.c forever if there
> > is no way to get the remaining users converted in the forseeable
> > future. It looks like they can cope with the annoying build warning
> > nicely.
> 
> Well, if you're going to deprecate something that 8 architectures rely
> on, it would be nice to tell people ... or even just linux-arch ... most

It's been told people. The deprecation patch was on LKMl (I don't
remember whether I sent it to linux-arch), but there were a bunch of
related patches to clean out the old irq related cruft which were sent
to linux-arch and also hit the parisc tree. There is an entry in
feature-removal-schedule.txt for 18 month now.

> of us do read that.  I've actually never noticed the warning the commit
> activated in any of my parisc compiles for some reason.

CONFIG_ENABLE_WARN_DEPRECATED=y perhaps ?

I'm really tired of your whining when you did not get a personalized
taylored to your needs info.

14 architectures got converted and some maintainers sent out mail to
their users 18 month ago right after the deprecation patch was sent
(www.linux-mips.org/archives/linux-mips/2009-03/msg00068.html), there
were reviews of new architecture code on linux-arch where this was
pointed out, so don't tell me that there was not enough information
about this.

> > Either that or moving everything what breaks into staging/arch/* and
> > hand it over to GregKH :)
> > 
> > Thoughts ?
> 
> We could move x86 into staging while it tries out the replacement ...

The replacement of what? 

Thanks,

	tglx

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 19:34     ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-08 19:34 UTC (permalink / raw)
  To: James Bottomley
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 8 Sep 2010, James Bottomley wrote:
> On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> > plain text document attachment (genirq-troll-patch.patch)
> > __do_IRQ() has been deprecated after a two years migration phase in
> > commit 0e57aa1. Since then another 18 month have gone by.
> > 
> > So here's the status three and a half years after the flow based
> > infrastructure was merged:
> > 
> >  The following architectures are fully converted to the new flow
> >  handler code:
> > 
> >   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
> >   sparc 64bit, tile, x86, xtensa
> > 
> >   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> >   though)
> > 
> >  The following architectures are not using the generic interrupt
> >  infrastructure at all and are therefor unaffected:
> > 
> >   s390, m68k, sparc 32bit
> > 
> >  The following architectures are still using __do_IRQ():
> > 
> >   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> > 
> > So now the question arises what to do with __do_IRQ().
> > 
> > Removing it would be the right thing, but that'll break 8 archs, so
> > it's probably not considered a good idea, though for most of them the
> > conversion should be reasonably trivial.
> > 
> > I'm happy to move that code into kernel/irq/cruft.c forever if there
> > is no way to get the remaining users converted in the forseeable
> > future. It looks like they can cope with the annoying build warning
> > nicely.
> 
> Well, if you're going to deprecate something that 8 architectures rely
> on, it would be nice to tell people ... or even just linux-arch ... most

It's been told people. The deprecation patch was on LKMl (I don't
remember whether I sent it to linux-arch), but there were a bunch of
related patches to clean out the old irq related cruft which were sent
to linux-arch and also hit the parisc tree. There is an entry in
feature-removal-schedule.txt for 18 month now.

> of us do read that.  I've actually never noticed the warning the commit
> activated in any of my parisc compiles for some reason.

CONFIG_ENABLE_WARN_DEPRECATED=y perhaps ?

I'm really tired of your whining when you did not get a personalized
taylored to your needs info.

14 architectures got converted and some maintainers sent out mail to
their users 18 month ago right after the deprecation patch was sent
(www.linux-mips.org/archives/linux-mips/2009-03/msg00068.html), there
were reviews of new architecture code on linux-arch where this was
pointed out, so don't tell me that there was not enough information
about this.

> > Either that or moving everything what breaks into staging/arch/* and
> > hand it over to GregKH :)
> > 
> > Thoughts ?
> 
> We could move x86 into staging while it tries out the replacement ...

The replacement of what? 

Thanks,

	tglx

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:51   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing James Bottomley
  (?)
  (?)
@ 2010-09-08 20:28     ` Mike Frysinger
  -1 siblings, 0 replies; 59+ messages in thread
From: Mike Frysinger @ 2010-09-08 20:28 UTC (permalink / raw)
  To: James Bottomley
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 14:51, James Bottomley wrote:
> On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
>> plain text document attachment (genirq-troll-patch.patch)
>> __do_IRQ() has been deprecated after a two years migration phase in
>> commit 0e57aa1. Since then another 18 month have gone by.
>>
>> So here's the status three and a half years after the flow based
>> infrastructure was merged:
>>
>> =C2=A0The following architectures are still using __do_IRQ():
>>
>> =C2=A0 alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>>
>> So now the question arises what to do with __do_IRQ().
>>
>> Removing it would be the right thing, but that'll break 8 archs, so
>> it's probably not considered a good idea, though for most of them th=
e
>> conversion should be reasonably trivial.
>>
>> I'm happy to move that code into kernel/irq/cruft.c forever if there
>> is no way to get the remaining users converted in the forseeable
>> future. It looks like they can cope with the annoying build warning
>> nicely.
>
> Well, if you're going to deprecate something that 8 architectures rel=
y
> on, it would be nice to tell people ... or even just linux-arch ... m=
ost
> of us do read that. =C2=A0I've actually never noticed the warning the=
 commit
> activated in any of my parisc compiles for some reason.

the only reason Blackfin was converted quickly is because the code
issues a warning (that has been there for a long time):
# warning __do_IRQ is deprecated. Please convert to proper flow handler=
s

so i guess you're saying that you disable the "ENABLE_WARN_DEPRECATED"
option ?  or you dont pay attention to warnings when compiling kernels
?
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-08 20:28     ` Mike Frysinger
  0 siblings, 0 replies; 59+ messages in thread
From: Mike Frysinger @ 2010-09-08 20:28 UTC (permalink / raw)
  To: James Bottomley
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 14:51, James Bottomley wrote:
> On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
>> plain text document attachment (genirq-troll-patch.patch)
>> __do_IRQ() has been deprecated after a two years migration phase in
>> commit 0e57aa1. Since then another 18 month have gone by.
>>
>> So here's the status three and a half years after the flow based
>> infrastructure was merged:
>>
>>  The following architectures are still using __do_IRQ():
>>
>>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>>
>> So now the question arises what to do with __do_IRQ().
>>
>> Removing it would be the right thing, but that'll break 8 archs, so
>> it's probably not considered a good idea, though for most of them the
>> conversion should be reasonably trivial.
>>
>> I'm happy to move that code into kernel/irq/cruft.c forever if there
>> is no way to get the remaining users converted in the forseeable
>> future. It looks like they can cope with the annoying build warning
>> nicely.
>
> Well, if you're going to deprecate something that 8 architectures rely
> on, it would be nice to tell people ... or even just linux-arch ... most
> of us do read that.  I've actually never noticed the warning the commit
> activated in any of my parisc compiles for some reason.

the only reason Blackfin was converted quickly is because the code
issues a warning (that has been there for a long time):
# warning __do_IRQ is deprecated. Please convert to proper flow handlers

so i guess you're saying that you disable the "ENABLE_WARN_DEPRECATED"
option ?  or you dont pay attention to warnings when compiling kernels
?
-mike

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-08 20:28     ` Mike Frysinger
  0 siblings, 0 replies; 59+ messages in thread
From: Mike Frysinger @ 2010-09-08 20:28 UTC (permalink / raw)
  To: James Bottomley
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 14:51, James Bottomley wrote:
> On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
>> plain text document attachment (genirq-troll-patch.patch)
>> __do_IRQ() has been deprecated after a two years migration phase in
>> commit 0e57aa1. Since then another 18 month have gone by.
>>
>> So here's the status three and a half years after the flow based
>> infrastructure was merged:
>>
>>  The following architectures are still using __do_IRQ():
>>
>>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>>
>> So now the question arises what to do with __do_IRQ().
>>
>> Removing it would be the right thing, but that'll break 8 archs, so
>> it's probably not considered a good idea, though for most of them the
>> conversion should be reasonably trivial.
>>
>> I'm happy to move that code into kernel/irq/cruft.c forever if there
>> is no way to get the remaining users converted in the forseeable
>> future. It looks like they can cope with the annoying build warning
>> nicely.
>
> Well, if you're going to deprecate something that 8 architectures rely
> on, it would be nice to tell people ... or even just linux-arch ... most
> of us do read that.  I've actually never noticed the warning the commit
> activated in any of my parisc compiles for some reason.

the only reason Blackfin was converted quickly is because the code
issues a warning (that has been there for a long time):
# warning __do_IRQ is deprecated. Please convert to proper flow handlers

so i guess you're saying that you disable the "ENABLE_WARN_DEPRECATED"
option ?  or you dont pay attention to warnings when compiling kernels
?
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 20:28     ` Mike Frysinger
  0 siblings, 0 replies; 59+ messages in thread
From: Mike Frysinger @ 2010-09-08 20:28 UTC (permalink / raw)
  To: James Bottomley
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 14:51, James Bottomley wrote:
> On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
>> plain text document attachment (genirq-troll-patch.patch)
>> __do_IRQ() has been deprecated after a two years migration phase in
>> commit 0e57aa1. Since then another 18 month have gone by.
>>
>> So here's the status three and a half years after the flow based
>> infrastructure was merged:
>>
>>  The following architectures are still using __do_IRQ():
>>
>>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>>
>> So now the question arises what to do with __do_IRQ().
>>
>> Removing it would be the right thing, but that'll break 8 archs, so
>> it's probably not considered a good idea, though for most of them the
>> conversion should be reasonably trivial.
>>
>> I'm happy to move that code into kernel/irq/cruft.c forever if there
>> is no way to get the remaining users converted in the forseeable
>> future. It looks like they can cope with the annoying build warning
>> nicely.
>
> Well, if you're going to deprecate something that 8 architectures rely
> on, it would be nice to tell people ... or even just linux-arch ... most
> of us do read that.  I've actually never noticed the warning the commit
> activated in any of my parisc compiles for some reason.

the only reason Blackfin was converted quickly is because the code
issues a warning (that has been there for a long time):
# warning __do_IRQ is deprecated. Please convert to proper flow handlers

so i guess you're saying that you disable the "ENABLE_WARN_DEPRECATED"
option ?  or you dont pay attention to warnings when compiling kernels
?
-mike

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 19:34     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
@ 2010-09-08 20:35       ` James Bottomley
  -1 siblings, 0 replies; 59+ messages in thread
From: James Bottomley @ 2010-09-08 20:35 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 2010-09-08 at 21:34 +0200, Thomas Gleixner wrote:
> On Wed, 8 Sep 2010, James Bottomley wrote:
> > On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> > > plain text document attachment (genirq-troll-patch.patch)
> > > __do_IRQ() has been deprecated after a two years migration phase in
> > > commit 0e57aa1. Since then another 18 month have gone by.
> > > 
> > > So here's the status three and a half years after the flow based
> > > infrastructure was merged:
> > > 
> > >  The following architectures are fully converted to the new flow
> > >  handler code:
> > > 
> > >   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
> > >   sparc 64bit, tile, x86, xtensa
> > > 
> > >   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> > >   though)
> > > 
> > >  The following architectures are not using the generic interrupt
> > >  infrastructure at all and are therefor unaffected:
> > > 
> > >   s390, m68k, sparc 32bit
> > > 
> > >  The following architectures are still using __do_IRQ():
> > > 
> > >   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> > > 
> > > So now the question arises what to do with __do_IRQ().
> > > 
> > > Removing it would be the right thing, but that'll break 8 archs, so
> > > it's probably not considered a good idea, though for most of them the
> > > conversion should be reasonably trivial.
> > > 
> > > I'm happy to move that code into kernel/irq/cruft.c forever if there
> > > is no way to get the remaining users converted in the forseeable
> > > future. It looks like they can cope with the annoying build warning
> > > nicely.
> > 
> > Well, if you're going to deprecate something that 8 architectures rely
> > on, it would be nice to tell people ... or even just linux-arch ... most
> 
> It's been told people. The deprecation patch was on LKMl (I don't
> remember whether I sent it to linux-arch),

You didn't ... I checked.

>  but there were a bunch of
> related patches to clean out the old irq related cruft which were sent
> to linux-arch and also hit the parisc tree. There is an entry in
> feature-removal-schedule.txt for 18 month now.
> 
> > of us do read that.  I've actually never noticed the warning the commit
> > activated in any of my parisc compiles for some reason.
> 
> CONFIG_ENABLE_WARN_DEPRECATED=y perhaps ?
>
> I'm really tired of your whining when you did not get a personalized
> taylored to your needs info.

So you send out deliberate flame bait and then suffer humour failure at
an ironic reply?

> 14 architectures got converted and some maintainers sent out mail to
> their users 18 month ago right after the deprecation patch was sent
> (www.linux-mips.org/archives/linux-mips/2009-03/msg00068.html), there
> were reviews of new architecture code on linux-arch where this was
> pointed out, so don't tell me that there was not enough information
> about this.

Well, we could go round in circles over the cryptic nature of this
indirection for ages, but I've got a wonderful target flame war to get
back to, so why don't we just cut to the chase:

The missing information is what actually needs to be done.  Fortunately,
the documentation is here:

Documentation/DocBook/genericirq.tmpl

It gives a nice overview and describes what's needed.  Basically you're
replacing generic __do_IRQ() with an internal implementation tuned to
specific handler types using the either generic library of handler
functions in kernel/irq or something more hand crafted and chip
specific.
.
James



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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 20:35       ` James Bottomley
  0 siblings, 0 replies; 59+ messages in thread
From: James Bottomley @ 2010-09-08 20:35 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 2010-09-08 at 21:34 +0200, Thomas Gleixner wrote:
> On Wed, 8 Sep 2010, James Bottomley wrote:
> > On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> > > plain text document attachment (genirq-troll-patch.patch)
> > > __do_IRQ() has been deprecated after a two years migration phase in
> > > commit 0e57aa1. Since then another 18 month have gone by.
> > > 
> > > So here's the status three and a half years after the flow based
> > > infrastructure was merged:
> > > 
> > >  The following architectures are fully converted to the new flow
> > >  handler code:
> > > 
> > >   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
> > >   sparc 64bit, tile, x86, xtensa
> > > 
> > >   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> > >   though)
> > > 
> > >  The following architectures are not using the generic interrupt
> > >  infrastructure at all and are therefor unaffected:
> > > 
> > >   s390, m68k, sparc 32bit
> > > 
> > >  The following architectures are still using __do_IRQ():
> > > 
> > >   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> > > 
> > > So now the question arises what to do with __do_IRQ().
> > > 
> > > Removing it would be the right thing, but that'll break 8 archs, so
> > > it's probably not considered a good idea, though for most of them the
> > > conversion should be reasonably trivial.
> > > 
> > > I'm happy to move that code into kernel/irq/cruft.c forever if there
> > > is no way to get the remaining users converted in the forseeable
> > > future. It looks like they can cope with the annoying build warning
> > > nicely.
> > 
> > Well, if you're going to deprecate something that 8 architectures rely
> > on, it would be nice to tell people ... or even just linux-arch ... most
> 
> It's been told people. The deprecation patch was on LKMl (I don't
> remember whether I sent it to linux-arch),

You didn't ... I checked.

>  but there were a bunch of
> related patches to clean out the old irq related cruft which were sent
> to linux-arch and also hit the parisc tree. There is an entry in
> feature-removal-schedule.txt for 18 month now.
> 
> > of us do read that.  I've actually never noticed the warning the commit
> > activated in any of my parisc compiles for some reason.
> 
> CONFIG_ENABLE_WARN_DEPRECATED=y perhaps ?
>
> I'm really tired of your whining when you did not get a personalized
> taylored to your needs info.

So you send out deliberate flame bait and then suffer humour failure at
an ironic reply?

> 14 architectures got converted and some maintainers sent out mail to
> their users 18 month ago right after the deprecation patch was sent
> (www.linux-mips.org/archives/linux-mips/2009-03/msg00068.html), there
> were reviews of new architecture code on linux-arch where this was
> pointed out, so don't tell me that there was not enough information
> about this.

Well, we could go round in circles over the cryptic nature of this
indirection for ages, but I've got a wonderful target flame war to get
back to, so why don't we just cut to the chase:

The missing information is what actually needs to be done.  Fortunately,
the documentation is here:

Documentation/DocBook/genericirq.tmpl

It gives a nice overview and describes what's needed.  Basically you're
replacing generic __do_IRQ() with an internal implementation tuned to
specific handler types using the either generic library of handler
functions in kernel/irq or something more hand crafted and chip
specific.
.
James



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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:58   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
@ 2010-09-08 20:36     ` Luck, Tony
  -1 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-08 20:36 UTC (permalink / raw)
  To: Kyle McMartin, Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

> Thanks Thomas for the reminder, I'll poke at fixing parisc this week,
> and maybe try to fix ia64 and alpha too as penance for forgetting about
> this for so long.

I'll be happy to see ia64 converted ... I did look at it once a long
time ago, but couldn't work out what I had to do to replace do_IRQ.
If Kyle figures out the patch, I'll test.  If not, then some pointers
would be helpful.

-Tony

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 20:36     ` Luck, Tony
  0 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-08 20:36 UTC (permalink / raw)
  To: Kyle McMartin, Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

> Thanks Thomas for the reminder, I'll poke at fixing parisc this week,
> and maybe try to fix ia64 and alpha too as penance for forgetting about
> this for so long.

I'll be happy to see ia64 converted ... I did look at it once a long
time ago, but couldn't work out what I had to do to replace do_IRQ.
If Kyle figures out the patch, I'll test.  If not, then some pointers
would be helpful.

-Tony

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 20:35       ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing James Bottomley
@ 2010-09-08 21:35         ` Thomas Gleixner
  -1 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-08 21:35 UTC (permalink / raw)
  To: James Bottomley
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 8 Sep 2010, James Bottomley wrote:
> On Wed, 2010-09-08 at 21:34 +0200, Thomas Gleixner wrote:
> > On Wed, 8 Sep 2010, James Bottomley wrote:
> > > On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> > > > plain text document attachment (genirq-troll-patch.patch)
> > > > __do_IRQ() has been deprecated after a two years migration phase in
> > > > commit 0e57aa1. Since then another 18 month have gone by.
> > > > 
> > > > So here's the status three and a half years after the flow based
> > > > infrastructure was merged:
> > > > 
> > > >  The following architectures are fully converted to the new flow
> > > >  handler code:
> > > > 
> > > >   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
> > > >   sparc 64bit, tile, x86, xtensa
> > > > 
> > > >   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> > > >   though)
> > > > 
> > > >  The following architectures are not using the generic interrupt
> > > >  infrastructure at all and are therefor unaffected:
> > > > 
> > > >   s390, m68k, sparc 32bit
> > > > 
> > > >  The following architectures are still using __do_IRQ():
> > > > 
> > > >   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> > > > 
> > > > So now the question arises what to do with __do_IRQ().
> > > > 
> > > > Removing it would be the right thing, but that'll break 8 archs, so
> > > > it's probably not considered a good idea, though for most of them the
> > > > conversion should be reasonably trivial.
> > > > 
> > > > I'm happy to move that code into kernel/irq/cruft.c forever if there
> > > > is no way to get the remaining users converted in the forseeable
> > > > future. It looks like they can cope with the annoying build warning
> > > > nicely.
> > > 
> > > Well, if you're going to deprecate something that 8 architectures rely
> > > on, it would be nice to tell people ... or even just linux-arch ... most
> > 
> > It's been told people. The deprecation patch was on LKMl (I don't
> > remember whether I sent it to linux-arch),
> 
> You didn't ... I checked.
> 
> >  but there were a bunch of
> > related patches to clean out the old irq related cruft which were sent
> > to linux-arch and also hit the parisc tree. There is an entry in
> > feature-removal-schedule.txt for 18 month now.
> > 
> > > of us do read that.  I've actually never noticed the warning the commit
> > > activated in any of my parisc compiles for some reason.
> > 
> > CONFIG_ENABLE_WARN_DEPRECATED=y perhaps ?
> >
> > I'm really tired of your whining when you did not get a personalized
> > taylored to your needs info.
> 
> So you send out deliberate flame bait and then suffer humour failure at
> an ironic reply?

Darn, I missed the ironic tag.

I added you to the "beware-of-british-irony" filter of my .procmailrc
to avoid that in the future.

Thanks,

	tglx

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-08 21:35         ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-08 21:35 UTC (permalink / raw)
  To: James Bottomley
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, 8 Sep 2010, James Bottomley wrote:
> On Wed, 2010-09-08 at 21:34 +0200, Thomas Gleixner wrote:
> > On Wed, 8 Sep 2010, James Bottomley wrote:
> > > On Wed, 2010-09-08 at 18:14 +0000, Thomas Gleixner wrote:
> > > > plain text document attachment (genirq-troll-patch.patch)
> > > > __do_IRQ() has been deprecated after a two years migration phase in
> > > > commit 0e57aa1. Since then another 18 month have gone by.
> > > > 
> > > > So here's the status three and a half years after the flow based
> > > > infrastructure was merged:
> > > > 
> > > >  The following architectures are fully converted to the new flow
> > > >  handler code:
> > > > 
> > > >   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
> > > >   sparc 64bit, tile, x86, xtensa
> > > > 
> > > >   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> > > >   though)
> > > > 
> > > >  The following architectures are not using the generic interrupt
> > > >  infrastructure at all and are therefor unaffected:
> > > > 
> > > >   s390, m68k, sparc 32bit
> > > > 
> > > >  The following architectures are still using __do_IRQ():
> > > > 
> > > >   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> > > > 
> > > > So now the question arises what to do with __do_IRQ().
> > > > 
> > > > Removing it would be the right thing, but that'll break 8 archs, so
> > > > it's probably not considered a good idea, though for most of them the
> > > > conversion should be reasonably trivial.
> > > > 
> > > > I'm happy to move that code into kernel/irq/cruft.c forever if there
> > > > is no way to get the remaining users converted in the forseeable
> > > > future. It looks like they can cope with the annoying build warning
> > > > nicely.
> > > 
> > > Well, if you're going to deprecate something that 8 architectures rely
> > > on, it would be nice to tell people ... or even just linux-arch ... most
> > 
> > It's been told people. The deprecation patch was on LKMl (I don't
> > remember whether I sent it to linux-arch),
> 
> You didn't ... I checked.
> 
> >  but there were a bunch of
> > related patches to clean out the old irq related cruft which were sent
> > to linux-arch and also hit the parisc tree. There is an entry in
> > feature-removal-schedule.txt for 18 month now.
> > 
> > > of us do read that.  I've actually never noticed the warning the commit
> > > activated in any of my parisc compiles for some reason.
> > 
> > CONFIG_ENABLE_WARN_DEPRECATED=y perhaps ?
> >
> > I'm really tired of your whining when you did not get a personalized
> > taylored to your needs info.
> 
> So you send out deliberate flame bait and then suffer humour failure at
> an ironic reply?

Darn, I missed the ironic tag.

I added you to the "beware-of-british-irony" filter of my .procmailrc
to avoid that in the future.

Thanks,

	tglx

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
                     ` (2 preceding siblings ...)
  (?)
@ 2010-09-09  7:10   ` Mikael Starvik
  -1 siblings, 0 replies; 59+ messages in thread
From: Mikael Starvik @ 2010-09-09  7:10 UTC (permalink / raw)
  To: Thomas Gleixner, LKML, Jesper Nilsson
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

>From CRIS perspective it is perfectly ok to remove __do_IRQ. At the latest when we notice that our build breaks we will fix it and preferably before that.

/Mikael

-----Original Message-----
From: Thomas Gleixner [mailto:tglx@linutronix.de] 
Sent: den 8 september 2010 20:14
To: LKML
Cc: Linus Torvalds; Andrew Morton; Ingo Molnar; Peter Zijlstra; Christoph Hellwig; linux-alpha@vger.kernel.org; linux-cris-kernel; Haavard Skinnemoen; Tony Luck; linux-ia64@vger.kernel.org; Yoshinori Sato; Hirokazu Takata; Greg Ungerer; Jeff Dike; linux-parisc@vger.kernel.org; Chris Zankel; linux-arch@vger.kernel.org
Subject: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
===================================================================
--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
===================================================================
--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
===================================================================
--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-09  7:10   ` Mikael Starvik
  0 siblings, 0 replies; 59+ messages in thread
From: Mikael Starvik @ 2010-09-09  7:10 UTC (permalink / raw)
  To: Thomas Gleixner, LKML, Jesper Nilsson
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

>From CRIS perspective it is perfectly ok to remove __do_IRQ. At the latest when we notice that our build breaks we will fix it and preferably before that.

/Mikael

-----Original Message-----
From: Thomas Gleixner [mailto:tglx@linutronix.de] 
Sent: den 8 september 2010 20:14
To: LKML
Cc: Linus Torvalds; Andrew Morton; Ingo Molnar; Peter Zijlstra; Christoph Hellwig; linux-alpha@vger.kernel.org; linux-cris-kernel; Haavard Skinnemoen; Tony Luck; linux-ia64@vger.kernel.org; Yoshinori Sato; Hirokazu Takata; Greg Ungerer; Jeff Dike; linux-parisc@vger.kernel.org; Chris Zankel; linux-arch@vger.kernel.org
Subject: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
===================================================================
--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
===================================================================
--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
===================================================================
--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif
-
 void early_init_irq_lock_class(void)
 {
 	struct irq_desc *desc;



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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-09  7:10   ` Mikael Starvik
  0 siblings, 0 replies; 59+ messages in thread
From: Mikael Starvik @ 2010-09-09  7:10 UTC (permalink / raw)
  To: Thomas Gleixner, LKML, Jesper Nilsson
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

From CRIS perspective it is perfectly ok to remove __do_IRQ. At the latest when we notice that our build breaks we will fix it and preferably before that.

/Mikael

-----Original Message-----
From: Thomas Gleixner [mailto:tglx@linutronix.de] 
Sent: den 8 september 2010 20:14
To: LKML
Cc: Linus Torvalds; Andrew Morton; Ingo Molnar; Peter Zijlstra; Christoph Hellwig; linux-alpha@vger.kernel.org; linux-cris-kernel; Haavard Skinnemoen; Tony Luck; linux-ia64@vger.kernel.org; Yoshinori Sato; Hirokazu Takata; Greg Ungerer; Jeff Dike; linux-parisc@vger.kernel.org; Chris Zankel; linux-arch@vger.kernel.org
Subject: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
===================================================================
--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
===================================================================
--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
===================================================================
--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-09  7:10   ` Mikael Starvik
  0 siblings, 0 replies; 59+ messages in thread
From: Mikael Starvik @ 2010-09-09  7:10 UTC (permalink / raw)
  To: Thomas Gleixner, LKML, Jesper Nilsson
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

From CRIS perspective it is perfectly ok to remove __do_IRQ. At the latest when we notice that our build breaks we will fix it and preferably before that.

/Mikael

-----Original Message-----
From: Thomas Gleixner [mailto:tglx@linutronix.de] 
Sent: den 8 september 2010 20:14
To: LKML
Cc: Linus Torvalds; Andrew Morton; Ingo Molnar; Peter Zijlstra; Christoph Hellwig; linux-alpha@vger.kernel.org; linux-cris-kernel; Haavard Skinnemoen; Tony Luck; linux-ia64@vger.kernel.org; Yoshinori Sato; Hirokazu Takata; Greg Ungerer; Jeff Dike; linux-parisc@vger.kernel.org; Chris Zankel; linux-arch@vger.kernel.org
Subject: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
===================================================================
--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
===================================================================
--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
===================================================================
--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
===================================================================
--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif
-
 void early_init_irq_lock_class(void)
 {
 	struct irq_desc *desc;



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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-09  7:10   ` Mikael Starvik
  0 siblings, 0 replies; 59+ messages in thread
From: Mikael Starvik @ 2010-09-09  7:10 UTC (permalink / raw)
  To: Thomas Gleixner, LKML, Jesper Nilsson
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

From CRIS perspective it is perfectly ok to remove __do_IRQ. At the latest when we notice that our build breaks we will fix it and preferably before that.

/Mikael

-----Original Message-----
From: Thomas Gleixner [mailto:tglx@linutronix.de] 
Sent: den 8 september 2010 20:14
To: LKML
Cc: Linus Torvalds; Andrew Morton; Ingo Molnar; Peter Zijlstra; Christoph Hellwig; linux-alpha@vger.kernel.org; linux-cris-kernel; Haavard Skinnemoen; Tony Luck; linux-ia64@vger.kernel.org; Yoshinori Sato; Hirokazu Takata; Greg Ungerer; Jeff Dike; linux-parisc@vger.kernel.org; Chris Zankel; linux-arch@vger.kernel.org
Subject: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code

__do_IRQ() has been deprecated after a two years migration phase in
commit 0e57aa1. Since then another 18 month have gone by.

So here's the status three and a half years after the flow based
infrastructure was merged:

 The following architectures are fully converted to the new flow
 handler code:

  arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
  sparc 64bit, tile, x86, xtensa

  (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
  though)

 The following architectures are not using the generic interrupt
 infrastructure at all and are therefor unaffected:

  s390, m68k, sparc 32bit

 The following architectures are still using __do_IRQ():

  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

So now the question arises what to do with __do_IRQ().

Removing it would be the right thing, but that'll break 8 archs, so
it's probably not considered a good idea, though for most of them the
conversion should be reasonably trivial.

I'm happy to move that code into kernel/irq/cruft.c forever if there
is no way to get the remaining users converted in the forseeable
future. It looks like they can cope with the annoying build warning
nicely.

Either that or moving everything what breaks into staging/arch/* and
hand it over to GregKH :)

Thoughts ?

Not-Signed-off-by-yet: Thomas Gleixner <tglx@linutronix.de>

---
 Documentation/DocBook/genericirq.tmpl      |   29 -------
 Documentation/feature-removal-schedule.txt |    8 --
 include/linux/irq.h                        |   20 -----
 kernel/irq/handle.c                        |  111 -----------------------------
 4 files changed, 2 insertions(+), 166 deletions(-)

Index: linux-2.6/Documentation/DocBook/genericirq.tmpl
=================================--- linux-2.6.orig/Documentation/DocBook/genericirq.tmpl
+++ linux-2.6/Documentation/DocBook/genericirq.tmpl
@@ -147,13 +147,6 @@
 	use a generic irq-flow implementation for 'level type' interrupts
 	and add a (sub)architecture specific 'edge type' implementation.
 	</para>
-	<para>
-	To make the transition to the new model easier and prevent the
-	breakage of existing implementations, the __do_IRQ() super-handler
-	is still available. This leads to a kind of duality for the time
-	being. Over time the new model should be used in more and more
-	architectures, as it enables smaller and cleaner IRQ subsystems.
-	</para>
   </chapter>
   <chapter id="bugs">
     <title>Known Bugs And Assumptions</title>
@@ -402,28 +395,6 @@ desc->chip->end();
     </sect1>
   </chapter>
 
-  <chapter id="doirq">
-     <title>__do_IRQ entry point</title>
-     <para>
- 	The original implementation __do_IRQ() is an alternative entry
-	point for all types of interrupts.
-     </para>
-     <para>
-	This handler turned out to be not suitable for all
-	interrupt hardware and was therefore reimplemented with split
-	functionality for egde/level/simple/percpu interrupts. This is not
-	only a functional optimization. It also shortens code paths for
-	interrupts.
-      </para>
-      <para>
-	To make use of the split implementation, replace the call to
-	__do_IRQ by a call to desc->handle_irq() and associate
-        the appropriate handler function to desc->handle_irq().
-	In most cases the generic handler implementations should
-	be sufficient.
-     </para>
-  </chapter>
-
   <chapter id="locking">
      <title>Locking on SMP</title>
      <para>
Index: linux-2.6/Documentation/feature-removal-schedule.txt
=================================--- linux-2.6.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6/Documentation/feature-removal-schedule.txt
@@ -315,14 +315,6 @@ Who:	Dave Jones <davej@redhat.com>, Matt
 
 -----------------------------
 
-What:	__do_IRQ all in one fits nothing interrupt handler
-When:	2.6.32
-Why:	__do_IRQ was kept for easy migration to the type flow handlers.
-	More than two years of migration time is enough.
-Who:	Thomas Gleixner <tglx@linutronix.de>
-
------------------------------
-
 What:	fakephp and associated sysfs files in /sys/bus/pci/slots/
 When:	2011
 Why:	In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
Index: linux-2.6/include/linux/irq.h
=================================--- linux-2.6.orig/include/linux/irq.h
+++ linux-2.6/include/linux/irq.h
@@ -150,7 +150,7 @@ struct irq_2_iommu;
  * @timer_rand_state:	pointer to timer rand state struct
  * @kstat_irqs:		irq stats per cpu
  * @irq_2_iommu:	iommu with this irq
- * @handle_irq:		highlevel irq-events handler [if NULL, __do_IRQ()]
+ * @handle_irq:		highlevel irq-events handler
  * @chip:		low level interrupt hardware access
  * @msi_desc:		MSI descriptor
  * @handler_data:	per-IRQ data for the irq_chip methods
@@ -294,28 +294,12 @@ extern void handle_bad_irq(unsigned int 
 extern void handle_nested_irq(unsigned int irq);
 
 /*
- * Monolithic do_IRQ implementation.
- */
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-extern unsigned int __do_IRQ(unsigned int irq);
-#endif
-
-/*
  * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
+ * handle an interrupt.
  */
 static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 	desc->handle_irq(irq, desc);
-#else
-	if (likely(desc->handle_irq))
-		desc->handle_irq(irq, desc);
-	else
-		__do_IRQ(irq);
-#endif
 }
 
 static inline void generic_handle_irq(unsigned int irq)
Index: linux-2.6/kernel/irq/handle.c
=================================--- linux-2.6.orig/kernel/irq/handle.c
+++ linux-2.6/kernel/irq/handle.c
@@ -426,117 +426,6 @@ irqreturn_t handle_IRQ_event(unsigned in
 	return retval;
 }
 
-#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
-
-#ifdef CONFIG_ENABLE_WARN_DEPRECATED
-# warning __do_IRQ is deprecated. Please convert to proper flow handlers
-#endif
-
-/**
- * __do_IRQ - original all in one highlevel IRQ handler
- * @irq:	the interrupt number
- *
- * __do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- *
- * This is the original x86 implementation which is used for every
- * interrupt type.
- */
-unsigned int __do_IRQ(unsigned int irq)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irqaction *action;
-	unsigned int status;
-
-	kstat_incr_irqs_this_cpu(irq, desc);
-
-	if (CHECK_IRQ_PER_CPU(desc->status)) {
-		irqreturn_t action_ret;
-
-		/*
-		 * No locking required for CPU-local interrupts:
-		 */
-		if (desc->chip->ack)
-			desc->chip->ack(irq);
-		if (likely(!(desc->status & IRQ_DISABLED))) {
-			action_ret = handle_IRQ_event(irq, desc->action);
-			if (!noirqdebug)
-				note_interrupt(irq, desc, action_ret);
-		}
-		desc->chip->end(irq);
-		return 1;
-	}
-
-	raw_spin_lock(&desc->lock);
-	if (desc->chip->ack)
-		desc->chip->ack(irq);
-	/*
-	 * REPLAY is when Linux resends an IRQ that was dropped earlier
-	 * WAITING is used by probe to mark irqs that are being tested
-	 */
-	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
-	status |= IRQ_PENDING; /* we _want_ to handle it */
-
-	/*
-	 * If the IRQ is disabled for whatever reason, we cannot
-	 * use the action we have.
-	 */
-	action = NULL;
-	if (likely(!(status & (IRQ_DISABLED | IRQ_INPROGRESS)))) {
-		action = desc->action;
-		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
-	}
-	desc->status = status;
-
-	/*
-	 * If there is no IRQ handler or it was disabled, exit early.
-	 * Since we set PENDING, if another processor is handling
-	 * a different instance of this same irq, the other processor
-	 * will take care of it.
-	 */
-	if (unlikely(!action))
-		goto out;
-
-	/*
-	 * Edge triggered interrupts need to remember
-	 * pending events.
-	 * This applies to any hw interrupts that allow a second
-	 * instance of the same irq to arrive while we are in do_IRQ
-	 * or in the handler. But the code here only handles the _second_
-	 * instance of the irq, not the third or fourth. So it is mostly
-	 * useful for irq hardware that does not mask cleanly in an
-	 * SMP environment.
-	 */
-	for (;;) {
-		irqreturn_t action_ret;
-
-		raw_spin_unlock(&desc->lock);
-
-		action_ret = handle_IRQ_event(irq, action);
-		if (!noirqdebug)
-			note_interrupt(irq, desc, action_ret);
-
-		raw_spin_lock(&desc->lock);
-		if (likely(!(desc->status & IRQ_PENDING)))
-			break;
-		desc->status &= ~IRQ_PENDING;
-	}
-	desc->status &= ~IRQ_INPROGRESS;
-
-out:
-	/*
-	 * The ->end() handler has to deal with interrupts which got
-	 * disabled while the handler was running.
-	 */
-	desc->chip->end(irq);
-	raw_spin_unlock(&desc->lock);
-
-	return 1;
-}
-#endif
-
 void early_init_irq_lock_class(void)
 {
 	struct irq_desc *desc;



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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
@ 2010-09-09  7:21   ` Greg Ungerer
  -1 siblings, 0 replies; 59+ messages in thread
From: Greg Ungerer @ 2010-09-09  7:21 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

Thomas Gleixner wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
> commit 0e57aa1. Since then another 18 month have gone by.
> 
> So here's the status three and a half years after the flow based
> infrastructure was merged:
> 
>  The following architectures are fully converted to the new flow
>  handler code:
> 
>   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
>   sparc 64bit, tile, x86, xtensa
> 
>   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
>   though)
> 
>  The following architectures are not using the generic interrupt
>  infrastructure at all and are therefor unaffected:
> 
>   s390, m68k, sparc 32bit
> 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

The m68knommu arch should be easy to fix up. Here is a first pass
patch. Tested and working on 1 board so far. I need to check all
the processor types, and test a few more to be sure :-)

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

[-- Attachment #2: m68knommu-stop-using-__do_IRQ.patch --]
[-- Type: text/x-patch, Size: 3531 bytes --]

m68knommu: stop using __do_IRQ

The use of __do_IRQ is deprecated, so lets stop using it.
Generally the interrupts on the supported processors here are
level triggered, so this is strait forward to switch over to
using the standard handle_level_irq flow handler.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
 arch/m68knommu/Kconfig                       |    4 ++++
 arch/m68knommu/platform/5272/intc.c          |    1 +
 arch/m68knommu/platform/68328/ints.c         |    1 +
 arch/m68knommu/platform/68360/ints.c         |    1 +
 arch/m68knommu/platform/coldfire/intc-2.c    |    1 +
 arch/m68knommu/platform/coldfire/intc-simr.c |    1 +
 arch/m68knommu/platform/coldfire/intc.c      |    1 +
 7 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 2609c39..fd28178 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -59,6 +59,10 @@ config GENERIC_HARDIRQS
 	bool
 	default y
 
+config GENERIC_HARDIRQS_NO__DO_IRQ
+	bool
+	default y
+
 config GENERIC_CALIBRATE_DELAY
 	bool
 	default y
diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
index 7081e0a..e9da6f1 100644
--- a/arch/m68knommu/platform/5272/intc.c
+++ b/arch/m68knommu/platform/5272/intc.c
@@ -133,6 +133,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
 		intc_irq_set_type(irq, 0);
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
index b91ee85..90516ee 100644
--- a/arch/m68knommu/platform/68328/ints.c
+++ b/arch/m68knommu/platform/68328/ints.c
@@ -183,6 +183,7 @@ void __init init_IRQ(void)
 		irq_desc[i].action = NULL;
 		irq_desc[i].depth = 1;
 		irq_desc[i].chip = &intc_irq_chip;
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
index 6f22970..cdf691e 100644
--- a/arch/m68knommu/platform/68360/ints.c
+++ b/arch/m68knommu/platform/68360/ints.c
@@ -136,6 +136,7 @@ void init_IRQ(void)
 		irq_desc[i].action = NULL;
 		irq_desc[i].depth = 1;
 		irq_desc[i].chip = &intc_irq_chip;
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/coldfire/intc-2.c b/arch/m68knommu/platform/coldfire/intc-2.c
index 5598c8b..6410f7e 100644
--- a/arch/m68knommu/platform/coldfire/intc-2.c
+++ b/arch/m68knommu/platform/coldfire/intc-2.c
@@ -88,6 +88,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].action = NULL;
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c
index 1b01e79..7f4abb3 100644
--- a/arch/m68knommu/platform/coldfire/intc-simr.c
+++ b/arch/m68knommu/platform/coldfire/intc-simr.c
@@ -73,6 +73,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
 		intc_irq_set_type(irq, 0);
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c
index a4560c8..40b9e8d 100644
--- a/arch/m68knommu/platform/coldfire/intc.c
+++ b/arch/m68knommu/platform/coldfire/intc.c
@@ -148,6 +148,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
 		intc_irq_set_type(irq, 0);
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-09  7:21   ` Greg Ungerer
  0 siblings, 0 replies; 59+ messages in thread
From: Greg Ungerer @ 2010-09-09  7:21 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

Thomas Gleixner wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
> commit 0e57aa1. Since then another 18 month have gone by.
> 
> So here's the status three and a half years after the flow based
> infrastructure was merged:
> 
>  The following architectures are fully converted to the new flow
>  handler code:
> 
>   arm, avr32, blackfin, frv, microblaze, mips, mn10300, powerpc, score, sh,
>   sparc 64bit, tile, x86, xtensa
> 
>   (avr32 and xtensa should set CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
>   though)
> 
>  The following architectures are not using the generic interrupt
>  infrastructure at all and are therefor unaffected:
> 
>   s390, m68k, sparc 32bit
> 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

The m68knommu arch should be easy to fix up. Here is a first pass
patch. Tested and working on 1 board so far. I need to check all
the processor types, and test a few more to be sure :-)

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

[-- Attachment #2: m68knommu-stop-using-__do_IRQ.patch --]
[-- Type: text/x-patch, Size: 3531 bytes --]

m68knommu: stop using __do_IRQ

The use of __do_IRQ is deprecated, so lets stop using it.
Generally the interrupts on the supported processors here are
level triggered, so this is strait forward to switch over to
using the standard handle_level_irq flow handler.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
 arch/m68knommu/Kconfig                       |    4 ++++
 arch/m68knommu/platform/5272/intc.c          |    1 +
 arch/m68knommu/platform/68328/ints.c         |    1 +
 arch/m68knommu/platform/68360/ints.c         |    1 +
 arch/m68knommu/platform/coldfire/intc-2.c    |    1 +
 arch/m68knommu/platform/coldfire/intc-simr.c |    1 +
 arch/m68knommu/platform/coldfire/intc.c      |    1 +
 7 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 2609c39..fd28178 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -59,6 +59,10 @@ config GENERIC_HARDIRQS
 	bool
 	default y
 
+config GENERIC_HARDIRQS_NO__DO_IRQ
+	bool
+	default y
+
 config GENERIC_CALIBRATE_DELAY
 	bool
 	default y
diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
index 7081e0a..e9da6f1 100644
--- a/arch/m68knommu/platform/5272/intc.c
+++ b/arch/m68knommu/platform/5272/intc.c
@@ -133,6 +133,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
 		intc_irq_set_type(irq, 0);
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
index b91ee85..90516ee 100644
--- a/arch/m68knommu/platform/68328/ints.c
+++ b/arch/m68knommu/platform/68328/ints.c
@@ -183,6 +183,7 @@ void __init init_IRQ(void)
 		irq_desc[i].action = NULL;
 		irq_desc[i].depth = 1;
 		irq_desc[i].chip = &intc_irq_chip;
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
index 6f22970..cdf691e 100644
--- a/arch/m68knommu/platform/68360/ints.c
+++ b/arch/m68knommu/platform/68360/ints.c
@@ -136,6 +136,7 @@ void init_IRQ(void)
 		irq_desc[i].action = NULL;
 		irq_desc[i].depth = 1;
 		irq_desc[i].chip = &intc_irq_chip;
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/coldfire/intc-2.c b/arch/m68knommu/platform/coldfire/intc-2.c
index 5598c8b..6410f7e 100644
--- a/arch/m68knommu/platform/coldfire/intc-2.c
+++ b/arch/m68knommu/platform/coldfire/intc-2.c
@@ -88,6 +88,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].action = NULL;
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c
index 1b01e79..7f4abb3 100644
--- a/arch/m68knommu/platform/coldfire/intc-simr.c
+++ b/arch/m68knommu/platform/coldfire/intc-simr.c
@@ -73,6 +73,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
 		intc_irq_set_type(irq, 0);
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 
diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c
index a4560c8..40b9e8d 100644
--- a/arch/m68knommu/platform/coldfire/intc.c
+++ b/arch/m68knommu/platform/coldfire/intc.c
@@ -148,6 +148,7 @@ void __init init_IRQ(void)
 		irq_desc[irq].depth = 1;
 		irq_desc[irq].chip = &intc_irq_chip;
 		intc_irq_set_type(irq, 0);
+		set_irq_handler(irq, handle_level_irq);
 	}
 }
 

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-09  7:10   ` Mikael Starvik
@ 2010-09-09 13:44     ` Dialup Jon Norstog
  -1 siblings, 0 replies; 59+ messages in thread
From: Dialup Jon Norstog @ 2010-09-09 13:44 UTC (permalink / raw)
  To: Mikael Starvik, Thomas Gleixner, LKML, Jesper Nilsson
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch




---------- Original Message -----------
From: Mikael Starvik <mikael.starvik@axis.com>
To: Thomas Gleixner <tglx@linutronix.de>, LKML <linux-k 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 
> Removing it would be the right thing, but that'll break 8 archs, so
> it's probably not considered a good idea, though for most of them the
> conversion should be reasonably trivial.
> 
> I'm happy to move that code into kernel/irq/cruft.c forever if there
> is no way to get the remaining users converted in the forseeable
> future. It looks like they can cope with the annoying build warning
> nicely.
> 
> Either that or moving everything what breaks into staging/arch/* and
> hand it over to GregKH :)
> 
> Thoughts ?
 

To the lists:

My thought is, put something in the readme - like Jay Estabrook's note in the
current Alpha Core build.  At least so those of us who get wierd msgs during a
kernel build can know what they are all about.

TIA

jn

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-09 13:44     ` Dialup Jon Norstog
  0 siblings, 0 replies; 59+ messages in thread
From: Dialup Jon Norstog @ 2010-09-09 13:44 UTC (permalink / raw)
  To: Mikael Starvik, Thomas Gleixner, LKML, Jesper Nilsson
  Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch




---------- Original Message -----------
From: Mikael Starvik <mikael.starvik@axis.com>
To: Thomas Gleixner <tglx@linutronix.de>, LKML <linux-k 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 
> Removing it would be the right thing, but that'll break 8 archs, so
> it's probably not considered a good idea, though for most of them the
> conversion should be reasonably trivial.
> 
> I'm happy to move that code into kernel/irq/cruft.c forever if there
> is no way to get the remaining users converted in the forseeable
> future. It looks like they can cope with the annoying build warning
> nicely.
> 
> Either that or moving everything what breaks into staging/arch/* and
> hand it over to GregKH :)
> 
> Thoughts ?
 

To the lists:

My thought is, put something in the readme - like Jay Estabrook's note in the
current Alpha Core build.  At least so those of us who get wierd msgs during a
kernel build can know what they are all about.

TIA

jn

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-09  7:21   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Greg Ungerer
@ 2010-09-09 14:09     ` Kyle McMartin
  -1 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-09 14:09 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Thu, Sep 09, 2010 at 05:21:35PM +1000, Greg Ungerer wrote:
> The m68knommu arch should be easy to fix up. Here is a first pass
> patch. Tested and working on 1 board so far. I need to check all
> the processor types, and test a few more to be sure :-)
> 

Dunno if you noticed, Greg, but you've already had a removal patch
submitted some time ago...

Date: Wed, 16 Dec 2009 19:15:39 -0800                                                                                                                                              
From: Steven King <sfking@fdwdc.com>                                                                                                                                               
To: Greg Ungerer <gerg@snapgear.com>                                                                                                                                               
Subject: [PATCH] m68knommu: get rid of __do_IRQ and add support for
 using gpio irqs.       

(noticed this while searching for __do_IRQ related stuff in my email
last night.)

regards, Kyle

> 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

> m68knommu: stop using __do_IRQ
> 
> The use of __do_IRQ is deprecated, so lets stop using it.
> Generally the interrupts on the supported processors here are
> level triggered, so this is strait forward to switch over to
> using the standard handle_level_irq flow handler.
> 
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> ---
>  arch/m68knommu/Kconfig                       |    4 ++++
>  arch/m68knommu/platform/5272/intc.c          |    1 +
>  arch/m68knommu/platform/68328/ints.c         |    1 +
>  arch/m68knommu/platform/68360/ints.c         |    1 +
>  arch/m68knommu/platform/coldfire/intc-2.c    |    1 +
>  arch/m68knommu/platform/coldfire/intc-simr.c |    1 +
>  arch/m68knommu/platform/coldfire/intc.c      |    1 +
>  7 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
> index 2609c39..fd28178 100644
> --- a/arch/m68knommu/Kconfig
> +++ b/arch/m68knommu/Kconfig
> @@ -59,6 +59,10 @@ config GENERIC_HARDIRQS
>  	bool
>  	default y
>  
> +config GENERIC_HARDIRQS_NO__DO_IRQ
> +	bool
> +	default y
> +
>  config GENERIC_CALIBRATE_DELAY
>  	bool
>  	default y
> diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
> index 7081e0a..e9da6f1 100644
> --- a/arch/m68knommu/platform/5272/intc.c
> +++ b/arch/m68knommu/platform/5272/intc.c
> @@ -133,6 +133,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
>  		intc_irq_set_type(irq, 0);
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
> index b91ee85..90516ee 100644
> --- a/arch/m68knommu/platform/68328/ints.c
> +++ b/arch/m68knommu/platform/68328/ints.c
> @@ -183,6 +183,7 @@ void __init init_IRQ(void)
>  		irq_desc[i].action = NULL;
>  		irq_desc[i].depth = 1;
>  		irq_desc[i].chip = &intc_irq_chip;
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
> index 6f22970..cdf691e 100644
> --- a/arch/m68knommu/platform/68360/ints.c
> +++ b/arch/m68knommu/platform/68360/ints.c
> @@ -136,6 +136,7 @@ void init_IRQ(void)
>  		irq_desc[i].action = NULL;
>  		irq_desc[i].depth = 1;
>  		irq_desc[i].chip = &intc_irq_chip;
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/coldfire/intc-2.c b/arch/m68knommu/platform/coldfire/intc-2.c
> index 5598c8b..6410f7e 100644
> --- a/arch/m68knommu/platform/coldfire/intc-2.c
> +++ b/arch/m68knommu/platform/coldfire/intc-2.c
> @@ -88,6 +88,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].action = NULL;
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c
> index 1b01e79..7f4abb3 100644
> --- a/arch/m68knommu/platform/coldfire/intc-simr.c
> +++ b/arch/m68knommu/platform/coldfire/intc-simr.c
> @@ -73,6 +73,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
>  		intc_irq_set_type(irq, 0);
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c
> index a4560c8..40b9e8d 100644
> --- a/arch/m68knommu/platform/coldfire/intc.c
> +++ b/arch/m68knommu/platform/coldfire/intc.c
> @@ -148,6 +148,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
>  		intc_irq_set_type(irq, 0);
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  


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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-09 14:09     ` Kyle McMartin
  0 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-09 14:09 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Thu, Sep 09, 2010 at 05:21:35PM +1000, Greg Ungerer wrote:
> The m68knommu arch should be easy to fix up. Here is a first pass
> patch. Tested and working on 1 board so far. I need to check all
> the processor types, and test a few more to be sure :-)
> 

Dunno if you noticed, Greg, but you've already had a removal patch
submitted some time ago...

Date: Wed, 16 Dec 2009 19:15:39 -0800                                                                                                                                              
From: Steven King <sfking@fdwdc.com>                                                                                                                                               
To: Greg Ungerer <gerg@snapgear.com>                                                                                                                                               
Subject: [PATCH] m68knommu: get rid of __do_IRQ and add support for
 using gpio irqs.       

(noticed this while searching for __do_IRQ related stuff in my email
last night.)

regards, Kyle

> 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

> m68knommu: stop using __do_IRQ
> 
> The use of __do_IRQ is deprecated, so lets stop using it.
> Generally the interrupts on the supported processors here are
> level triggered, so this is strait forward to switch over to
> using the standard handle_level_irq flow handler.
> 
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> ---
>  arch/m68knommu/Kconfig                       |    4 ++++
>  arch/m68knommu/platform/5272/intc.c          |    1 +
>  arch/m68knommu/platform/68328/ints.c         |    1 +
>  arch/m68knommu/platform/68360/ints.c         |    1 +
>  arch/m68knommu/platform/coldfire/intc-2.c    |    1 +
>  arch/m68knommu/platform/coldfire/intc-simr.c |    1 +
>  arch/m68knommu/platform/coldfire/intc.c      |    1 +
>  7 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
> index 2609c39..fd28178 100644
> --- a/arch/m68knommu/Kconfig
> +++ b/arch/m68knommu/Kconfig
> @@ -59,6 +59,10 @@ config GENERIC_HARDIRQS
>  	bool
>  	default y
>  
> +config GENERIC_HARDIRQS_NO__DO_IRQ
> +	bool
> +	default y
> +
>  config GENERIC_CALIBRATE_DELAY
>  	bool
>  	default y
> diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
> index 7081e0a..e9da6f1 100644
> --- a/arch/m68knommu/platform/5272/intc.c
> +++ b/arch/m68knommu/platform/5272/intc.c
> @@ -133,6 +133,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
>  		intc_irq_set_type(irq, 0);
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
> index b91ee85..90516ee 100644
> --- a/arch/m68knommu/platform/68328/ints.c
> +++ b/arch/m68knommu/platform/68328/ints.c
> @@ -183,6 +183,7 @@ void __init init_IRQ(void)
>  		irq_desc[i].action = NULL;
>  		irq_desc[i].depth = 1;
>  		irq_desc[i].chip = &intc_irq_chip;
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
> index 6f22970..cdf691e 100644
> --- a/arch/m68knommu/platform/68360/ints.c
> +++ b/arch/m68knommu/platform/68360/ints.c
> @@ -136,6 +136,7 @@ void init_IRQ(void)
>  		irq_desc[i].action = NULL;
>  		irq_desc[i].depth = 1;
>  		irq_desc[i].chip = &intc_irq_chip;
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/coldfire/intc-2.c b/arch/m68knommu/platform/coldfire/intc-2.c
> index 5598c8b..6410f7e 100644
> --- a/arch/m68knommu/platform/coldfire/intc-2.c
> +++ b/arch/m68knommu/platform/coldfire/intc-2.c
> @@ -88,6 +88,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].action = NULL;
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c
> index 1b01e79..7f4abb3 100644
> --- a/arch/m68knommu/platform/coldfire/intc-simr.c
> +++ b/arch/m68knommu/platform/coldfire/intc-simr.c
> @@ -73,6 +73,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
>  		intc_irq_set_type(irq, 0);
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  
> diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c
> index a4560c8..40b9e8d 100644
> --- a/arch/m68knommu/platform/coldfire/intc.c
> +++ b/arch/m68knommu/platform/coldfire/intc.c
> @@ -148,6 +148,7 @@ void __init init_IRQ(void)
>  		irq_desc[irq].depth = 1;
>  		irq_desc[irq].chip = &intc_irq_chip;
>  		intc_irq_set_type(irq, 0);
> +		set_irq_handler(irq, handle_level_irq);
>  	}
>  }
>  


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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-09 14:09     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
@ 2010-09-09 23:17       ` Greg Ungerer
  -1 siblings, 0 replies; 59+ messages in thread
From: Greg Ungerer @ 2010-09-09 23:17 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch


Hi Kyle,

Kyle McMartin wrote:
> On Thu, Sep 09, 2010 at 05:21:35PM +1000, Greg Ungerer wrote:
>> The m68knommu arch should be easy to fix up. Here is a first pass
>> patch. Tested and working on 1 board so far. I need to check all
>> the processor types, and test a few more to be sure :-)
>>
> 
> Dunno if you noticed, Greg, but you've already had a removal patch
> submitted some time ago...

I had forgotten about that patch... But if you follow the email
trail I had to drop it soon after, it caused user space to lock
up. I let Steven know (in that same thread) but he never came
back with any fixes/updates.

(That patch also added support for edge triggered GPIO interrupts,
and that may well have been the source of the problems).

Thanks
Greg


> Date: Wed, 16 Dec 2009 19:15:39 -0800                                                                                                                                              
> From: Steven King <sfking@fdwdc.com>                                                                                                                                               
> To: Greg Ungerer <gerg@snapgear.com>                                                                                                                                               
> Subject: [PATCH] m68knommu: get rid of __do_IRQ and add support for
>  using gpio irqs.       
> 
> (noticed this while searching for __do_IRQ related stuff in my email
> last night.)
> 
> regards, Kyle
> 
>> 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
> 
>> m68knommu: stop using __do_IRQ
>>
>> The use of __do_IRQ is deprecated, so lets stop using it.
>> Generally the interrupts on the supported processors here are
>> level triggered, so this is strait forward to switch over to
>> using the standard handle_level_irq flow handler.
>>
>> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
>> ---
>>  arch/m68knommu/Kconfig                       |    4 ++++
>>  arch/m68knommu/platform/5272/intc.c          |    1 +
>>  arch/m68knommu/platform/68328/ints.c         |    1 +
>>  arch/m68knommu/platform/68360/ints.c         |    1 +
>>  arch/m68knommu/platform/coldfire/intc-2.c    |    1 +
>>  arch/m68knommu/platform/coldfire/intc-simr.c |    1 +
>>  arch/m68knommu/platform/coldfire/intc.c      |    1 +
>>  7 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
>> index 2609c39..fd28178 100644
>> --- a/arch/m68knommu/Kconfig
>> +++ b/arch/m68knommu/Kconfig
>> @@ -59,6 +59,10 @@ config GENERIC_HARDIRQS
>>  	bool
>>  	default y
>>  
>> +config GENERIC_HARDIRQS_NO__DO_IRQ
>> +	bool
>> +	default y
>> +
>>  config GENERIC_CALIBRATE_DELAY
>>  	bool
>>  	default y
>> diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
>> index 7081e0a..e9da6f1 100644
>> --- a/arch/m68knommu/platform/5272/intc.c
>> +++ b/arch/m68knommu/platform/5272/intc.c
>> @@ -133,6 +133,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>>  		intc_irq_set_type(irq, 0);
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
>> index b91ee85..90516ee 100644
>> --- a/arch/m68knommu/platform/68328/ints.c
>> +++ b/arch/m68knommu/platform/68328/ints.c
>> @@ -183,6 +183,7 @@ void __init init_IRQ(void)
>>  		irq_desc[i].action = NULL;
>>  		irq_desc[i].depth = 1;
>>  		irq_desc[i].chip = &intc_irq_chip;
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
>> index 6f22970..cdf691e 100644
>> --- a/arch/m68knommu/platform/68360/ints.c
>> +++ b/arch/m68knommu/platform/68360/ints.c
>> @@ -136,6 +136,7 @@ void init_IRQ(void)
>>  		irq_desc[i].action = NULL;
>>  		irq_desc[i].depth = 1;
>>  		irq_desc[i].chip = &intc_irq_chip;
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/coldfire/intc-2.c b/arch/m68knommu/platform/coldfire/intc-2.c
>> index 5598c8b..6410f7e 100644
>> --- a/arch/m68knommu/platform/coldfire/intc-2.c
>> +++ b/arch/m68knommu/platform/coldfire/intc-2.c
>> @@ -88,6 +88,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].action = NULL;
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c
>> index 1b01e79..7f4abb3 100644
>> --- a/arch/m68knommu/platform/coldfire/intc-simr.c
>> +++ b/arch/m68knommu/platform/coldfire/intc-simr.c
>> @@ -73,6 +73,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>>  		intc_irq_set_type(irq, 0);
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c
>> index a4560c8..40b9e8d 100644
>> --- a/arch/m68knommu/platform/coldfire/intc.c
>> +++ b/arch/m68knommu/platform/coldfire/intc.c
>> @@ -148,6 +148,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>>  		intc_irq_set_type(irq, 0);
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
> 
> 


-- 
------------------------------------------------------------------------
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] 59+ messages in thread

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-09 23:17       ` Greg Ungerer
  0 siblings, 0 replies; 59+ messages in thread
From: Greg Ungerer @ 2010-09-09 23:17 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch


Hi Kyle,

Kyle McMartin wrote:
> On Thu, Sep 09, 2010 at 05:21:35PM +1000, Greg Ungerer wrote:
>> The m68knommu arch should be easy to fix up. Here is a first pass
>> patch. Tested and working on 1 board so far. I need to check all
>> the processor types, and test a few more to be sure :-)
>>
> 
> Dunno if you noticed, Greg, but you've already had a removal patch
> submitted some time ago...

I had forgotten about that patch... But if you follow the email
trail I had to drop it soon after, it caused user space to lock
up. I let Steven know (in that same thread) but he never came
back with any fixes/updates.

(That patch also added support for edge triggered GPIO interrupts,
and that may well have been the source of the problems).

Thanks
Greg


> Date: Wed, 16 Dec 2009 19:15:39 -0800                                                                                                                                              
> From: Steven King <sfking@fdwdc.com>                                                                                                                                               
> To: Greg Ungerer <gerg@snapgear.com>                                                                                                                                               
> Subject: [PATCH] m68knommu: get rid of __do_IRQ and add support for
>  using gpio irqs.       
> 
> (noticed this while searching for __do_IRQ related stuff in my email
> last night.)
> 
> regards, Kyle
> 
>> 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
> 
>> m68knommu: stop using __do_IRQ
>>
>> The use of __do_IRQ is deprecated, so lets stop using it.
>> Generally the interrupts on the supported processors here are
>> level triggered, so this is strait forward to switch over to
>> using the standard handle_level_irq flow handler.
>>
>> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
>> ---
>>  arch/m68knommu/Kconfig                       |    4 ++++
>>  arch/m68knommu/platform/5272/intc.c          |    1 +
>>  arch/m68knommu/platform/68328/ints.c         |    1 +
>>  arch/m68knommu/platform/68360/ints.c         |    1 +
>>  arch/m68knommu/platform/coldfire/intc-2.c    |    1 +
>>  arch/m68knommu/platform/coldfire/intc-simr.c |    1 +
>>  arch/m68knommu/platform/coldfire/intc.c      |    1 +
>>  7 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
>> index 2609c39..fd28178 100644
>> --- a/arch/m68knommu/Kconfig
>> +++ b/arch/m68knommu/Kconfig
>> @@ -59,6 +59,10 @@ config GENERIC_HARDIRQS
>>  	bool
>>  	default y
>>  
>> +config GENERIC_HARDIRQS_NO__DO_IRQ
>> +	bool
>> +	default y
>> +
>>  config GENERIC_CALIBRATE_DELAY
>>  	bool
>>  	default y
>> diff --git a/arch/m68knommu/platform/5272/intc.c b/arch/m68knommu/platform/5272/intc.c
>> index 7081e0a..e9da6f1 100644
>> --- a/arch/m68knommu/platform/5272/intc.c
>> +++ b/arch/m68knommu/platform/5272/intc.c
>> @@ -133,6 +133,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>>  		intc_irq_set_type(irq, 0);
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
>> index b91ee85..90516ee 100644
>> --- a/arch/m68knommu/platform/68328/ints.c
>> +++ b/arch/m68knommu/platform/68328/ints.c
>> @@ -183,6 +183,7 @@ void __init init_IRQ(void)
>>  		irq_desc[i].action = NULL;
>>  		irq_desc[i].depth = 1;
>>  		irq_desc[i].chip = &intc_irq_chip;
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
>> index 6f22970..cdf691e 100644
>> --- a/arch/m68knommu/platform/68360/ints.c
>> +++ b/arch/m68knommu/platform/68360/ints.c
>> @@ -136,6 +136,7 @@ void init_IRQ(void)
>>  		irq_desc[i].action = NULL;
>>  		irq_desc[i].depth = 1;
>>  		irq_desc[i].chip = &intc_irq_chip;
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/coldfire/intc-2.c b/arch/m68knommu/platform/coldfire/intc-2.c
>> index 5598c8b..6410f7e 100644
>> --- a/arch/m68knommu/platform/coldfire/intc-2.c
>> +++ b/arch/m68knommu/platform/coldfire/intc-2.c
>> @@ -88,6 +88,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].action = NULL;
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c
>> index 1b01e79..7f4abb3 100644
>> --- a/arch/m68knommu/platform/coldfire/intc-simr.c
>> +++ b/arch/m68knommu/platform/coldfire/intc-simr.c
>> @@ -73,6 +73,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>>  		intc_irq_set_type(irq, 0);
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
>> diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c
>> index a4560c8..40b9e8d 100644
>> --- a/arch/m68knommu/platform/coldfire/intc.c
>> +++ b/arch/m68knommu/platform/coldfire/intc.c
>> @@ -148,6 +148,7 @@ void __init init_IRQ(void)
>>  		irq_desc[irq].depth = 1;
>>  		irq_desc[irq].chip = &intc_irq_chip;
>>  		intc_irq_set_type(irq, 0);
>> +		set_irq_handler(irq, handle_level_irq);
>>  	}
>>  }
>>  
> 
> 


-- 
------------------------------------------------------------------------
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] 59+ messages in thread

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
  (?)
@ 2010-09-27 17:36   ` Tony Luck
  -1 siblings, 0 replies; 59+ messages in thread
From: Tony Luck @ 2010-09-27 17:36 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 11:14 AM, Thomas Gleixner <tglx@linutronix.de> w=
rote:
> =A0The following architectures are still using __do_IRQ():
>
> =A0alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

Thomas,

I (belatedly) took a look at fixing ia64 ... but I've run into a small =
snag.
The __do_IRQ() routine makes a call to:

 desc->chip->end(irq);

while neither of the "handle_level_irq()" nor "handle_edge_irq()"
functions do this.

On ia64 iosapic_end_level_irq() call iosapic_eoi() for me. Without it
my system hangs during boot (with some driver timeout complaining
about dropped interrupts).

Is the omission of desc->chip->end(irq); deliberate? In which case
I need to find another place to call iosapic_eoi(). Or is it accidental=
?

Thanks

-Tony

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-27 17:36   ` Tony Luck
  0 siblings, 0 replies; 59+ messages in thread
From: Tony Luck @ 2010-09-27 17:36 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 11:14 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>  The following architectures are still using __do_IRQ():
>
>  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

Thomas,

I (belatedly) took a look at fixing ia64 ... but I've run into a small snag.
The __do_IRQ() routine makes a call to:

 desc->chip->end(irq);

while neither of the "handle_level_irq()" nor "handle_edge_irq()"
functions do this.

On ia64 iosapic_end_level_irq() call iosapic_eoi() for me. Without it
my system hangs during boot (with some driver timeout complaining
about dropped interrupts).

Is the omission of desc->chip->end(irq); deliberate? In which case
I need to find another place to call iosapic_eoi(). Or is it accidental?

Thanks

-Tony

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-27 17:36   ` Tony Luck
  0 siblings, 0 replies; 59+ messages in thread
From: Tony Luck @ 2010-09-27 17:36 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 11:14 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>  The following architectures are still using __do_IRQ():
>
>  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um

Thomas,

I (belatedly) took a look at fixing ia64 ... but I've run into a small snag.
The __do_IRQ() routine makes a call to:

 desc->chip->end(irq);

while neither of the "handle_level_irq()" nor "handle_edge_irq()"
functions do this.

On ia64 iosapic_end_level_irq() call iosapic_eoi() for me. Without it
my system hangs during boot (with some driver timeout complaining
about dropped interrupts).

Is the omission of desc->chip->end(irq); deliberate? In which case
I need to find another place to call iosapic_eoi(). Or is it accidental?

Thanks

-Tony

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-27 17:36   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Tony Luck
@ 2010-09-27 18:01     ` Thomas Gleixner
  -1 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-27 18:01 UTC (permalink / raw)
  To: Tony Luck
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

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



On Mon, 27 Sep 2010, Tony Luck wrote:

> On Wed, Sep 8, 2010 at 11:14 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> >  The following architectures are still using __do_IRQ():
> >
> >  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> Thomas,
> 
> I (belatedly) took a look at fixing ia64 ... but I've run into a small snag.
> The __do_IRQ() routine makes a call to:
> 
>  desc->chip->end(irq);
> 
> while neither of the "handle_level_irq()" nor "handle_edge_irq()"
> functions do this.
> 
> On ia64 iosapic_end_level_irq() call iosapic_eoi() for me. Without it
> my system hangs during boot (with some driver timeout complaining
> about dropped interrupts).
> 
> Is the omission of desc->chip->end(irq); deliberate? In which case
> I need to find another place to call iosapic_eoi(). Or is it accidental?

No, it's deliberate. The solution is to use the correct flow handler
for your device. We have currently several flow handlers implemented:

    handle_level_irq
	{
		if (chip->mask_ack)
			chip->mask_ack()
		else {
		     chip->mask();
		     if (chip->ack)
		     	chip->ack();
		}

		....

		chip->unmask();
	}

    handle_edge_irq
	{
		chip->ack()

		...
	}

    handle_simple_irq
	{
		...
	}

    handle_fasteoi_irq
	{
		...
		chip->eoi();
	}

    handle_percpu_irq
	{	
		if (chip->ack)
		     	chip->ack();
		
		if (chip->eoi)
		     	chip->eoi();
	}

Note, that handle_percpu_irq does not take the irq_desc->lock.

So the trick is to select the matching handler and have separate irq
chip implementations if necessary.

Hope that helps.

Thanks,

	tglx

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-27 18:01     ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-27 18:01 UTC (permalink / raw)
  To: Tony Luck
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

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



On Mon, 27 Sep 2010, Tony Luck wrote:

> On Wed, Sep 8, 2010 at 11:14 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> >  The following architectures are still using __do_IRQ():
> >
> >  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> Thomas,
> 
> I (belatedly) took a look at fixing ia64 ... but I've run into a small snag.
> The __do_IRQ() routine makes a call to:
> 
>  desc->chip->end(irq);
> 
> while neither of the "handle_level_irq()" nor "handle_edge_irq()"
> functions do this.
> 
> On ia64 iosapic_end_level_irq() call iosapic_eoi() for me. Without it
> my system hangs during boot (with some driver timeout complaining
> about dropped interrupts).
> 
> Is the omission of desc->chip->end(irq); deliberate? In which case
> I need to find another place to call iosapic_eoi(). Or is it accidental?

No, it's deliberate. The solution is to use the correct flow handler
for your device. We have currently several flow handlers implemented:

    handle_level_irq
	{
		if (chip->mask_ack)
			chip->mask_ack()
		else {
		     chip->mask();
		     if (chip->ack)
		     	chip->ack();
		}

		....

		chip->unmask();
	}

    handle_edge_irq
	{
		chip->ack()

		...
	}

    handle_simple_irq
	{
		...
	}

    handle_fasteoi_irq
	{
		...
		chip->eoi();
	}

    handle_percpu_irq
	{	
		if (chip->ack)
		     	chip->ack();
		
		if (chip->eoi)
		     	chip->eoi();
	}

Note, that handle_percpu_irq does not take the irq_desc->lock.

So the trick is to select the matching handler and have separate irq
chip implementations if necessary.

Hope that helps.

Thanks,

	tglx

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-27 18:01     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
@ 2010-09-27 18:39       ` Luck, Tony
  -1 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-27 18:39 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

> No, it's deliberate. The solution is to use the correct flow handler
> for your device. We have currently several flow handlers implemented:

Yes, I found the different "handle_*_irq()" functions. The _percpu_
variant works fine for the ia64 per-cpu interrupt paths.

But *NONE* of them call desc->chip->end() (even though the code flow
in Documentation/DcoBook/genericirq.tmpl says that three of them do
call it].  So it appears that this was thought to be necessary when
the docs were written, but was not put into the code.

The ia64 chip->end function for edge triggered interrupts is a nop(),
so handle_edge_irq() ought to work just fine for it [can't confirm
from my initial tests because the HP box I'm using only has level
triggered ones].

handle_level_irq() works for my level triggered interrupts if I add
a "desc->chip->end(irq)" call to it.

git grep "chip->end" appears to show that the only use of chip->end
is in the "Recovery handler for misrouted interrupts": try_one_irq()

At minimum we seem to have some documentation inconsistencies with
the code.

-Tony



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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-27 18:39       ` Luck, Tony
  0 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-27 18:39 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

> No, it's deliberate. The solution is to use the correct flow handler
> for your device. We have currently several flow handlers implemented:

Yes, I found the different "handle_*_irq()" functions. The _percpu_
variant works fine for the ia64 per-cpu interrupt paths.

But *NONE* of them call desc->chip->end() (even though the code flow
in Documentation/DcoBook/genericirq.tmpl says that three of them do
call it].  So it appears that this was thought to be necessary when
the docs were written, but was not put into the code.

The ia64 chip->end function for edge triggered interrupts is a nop(),
so handle_edge_irq() ought to work just fine for it [can't confirm
from my initial tests because the HP box I'm using only has level
triggered ones].

handle_level_irq() works for my level triggered interrupts if I add
a "desc->chip->end(irq)" call to it.

git grep "chip->end" appears to show that the only use of chip->end
is in the "Recovery handler for misrouted interrupts": try_one_irq()

At minimum we seem to have some documentation inconsistencies with
the code.

-Tony



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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-27 18:39       ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Luck, Tony
@ 2010-09-27 18:49         ` Thomas Gleixner
  -1 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-27 18:49 UTC (permalink / raw)
  To: Luck, Tony
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Mon, 27 Sep 2010, Luck, Tony wrote:

> > No, it's deliberate. The solution is to use the correct flow handler
> > for your device. We have currently several flow handlers implemented:
> 
> Yes, I found the different "handle_*_irq()" functions. The _percpu_
> variant works fine for the ia64 per-cpu interrupt paths.
> 
> But *NONE* of them call desc->chip->end() (even though the code flow
> in Documentation/DcoBook/genericirq.tmpl says that three of them do
> call it].  So it appears that this was thought to be necessary when
> the docs were written, but was not put into the code.

Yeah, sorry.
 
> The ia64 chip->end function for edge triggered interrupts is a nop(),
> so handle_edge_irq() ought to work just fine for it [can't confirm
> from my initial tests because the HP box I'm using only has level
> triggered ones].
> 
> handle_level_irq() works for my level triggered interrupts if I add
> a "desc->chip->end(irq)" call to it.

Hmm, why isn't chip->unmask() sufficient ?
 
> git grep "chip->end" appears to show that the only use of chip->end
> is in the "Recovery handler for misrouted interrupts": try_one_irq()

Right, that's just due to the old __do_IRQ() compability.
 
> At minimum we seem to have some documentation inconsistencies with
> the code.

Will fix.

Thanks,

	tglx

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-27 18:49         ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-27 18:49 UTC (permalink / raw)
  To: Luck, Tony
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Mon, 27 Sep 2010, Luck, Tony wrote:

> > No, it's deliberate. The solution is to use the correct flow handler
> > for your device. We have currently several flow handlers implemented:
> 
> Yes, I found the different "handle_*_irq()" functions. The _percpu_
> variant works fine for the ia64 per-cpu interrupt paths.
> 
> But *NONE* of them call desc->chip->end() (even though the code flow
> in Documentation/DcoBook/genericirq.tmpl says that three of them do
> call it].  So it appears that this was thought to be necessary when
> the docs were written, but was not put into the code.

Yeah, sorry.
 
> The ia64 chip->end function for edge triggered interrupts is a nop(),
> so handle_edge_irq() ought to work just fine for it [can't confirm
> from my initial tests because the HP box I'm using only has level
> triggered ones].
> 
> handle_level_irq() works for my level triggered interrupts if I add
> a "desc->chip->end(irq)" call to it.

Hmm, why isn't chip->unmask() sufficient ?
 
> git grep "chip->end" appears to show that the only use of chip->end
> is in the "Recovery handler for misrouted interrupts": try_one_irq()

Right, that's just due to the old __do_IRQ() compability.
 
> At minimum we seem to have some documentation inconsistencies with
> the code.

Will fix.

Thanks,

	tglx

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-27 18:49         ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
@ 2010-09-27 19:01           ` Luck, Tony
  -1 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-27 19:01 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

>> handle_level_irq() works for my level triggered interrupts if I add
>> a "desc->chip->end(irq)" call to it.
>
> Hmm, why isn't chip->unmask() sufficient ?
 
That's a good question.  I'll take a look at what ia64 is doing
in the ->unmask() and ->end() functions to see if I can fix this
with some code shuffling.

Thanks

-Tony

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-27 19:01           ` Luck, Tony
  0 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-27 19:01 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

>> handle_level_irq() works for my level triggered interrupts if I add
>> a "desc->chip->end(irq)" call to it.
>
> Hmm, why isn't chip->unmask() sufficient ?
 
That's a good question.  I'll take a look at what ia64 is doing
in the ->unmask() and ->end() functions to see if I can fix this
with some code shuffling.

Thanks

-Tony

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
  (?)
  (?)
@ 2010-09-27 19:48   ` richard -rw- weinberger
  -1 siblings, 0 replies; 59+ messages in thread
From: richard -rw- weinberger @ 2010-09-27 19:48 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 8:14 PM, Thomas Gleixner <tglx@linutronix.de> wr=
ote:
> __do_IRQ() has been deprecated after a two years migration phase in
> =A0The following architectures are still using __do_IRQ():
>
> =A0alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>

Maybe I'm naive but shouldn't this path work?
Does um need some extra work?

The linux executable aborts immediately when I apply my patch.

---cut---
Locating the bottom of the address space ... 0x10000
Locating the top of the address space ... 0xc0000000
Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Aborted
---cut---

diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
index ec2b8da..ae950e0 100644
--- a/arch/um/Kconfig.um
+++ b/arch/um/Kconfig.um
@@ -147,3 +147,8 @@ config KERNEL_STACK_ORDER
          This option determines the size of UML kernel stacks.  They w=
ill
          be 1 << order pages.  The default is OK unless you're running=
 Valgrind
          on UML, in which case, set this to 3.
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       def_bool y
+
+
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index a3f0b04..3d44535 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -334,7 +334,7 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *re=
gs)
 {
        struct pt_regs *old_regs =3D set_irq_regs((struct pt_regs *)reg=
s);
        irq_enter();
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
        irq_exit();
        set_irq_regs(old_regs);
        return 1;
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
 in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-27 19:48   ` richard -rw- weinberger
  0 siblings, 0 replies; 59+ messages in thread
From: richard -rw- weinberger @ 2010-09-27 19:48 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 8:14 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
>  The following architectures are still using __do_IRQ():
>
>  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>

Maybe I'm naive but shouldn't this path work?
Does um need some extra work?

The linux executable aborts immediately when I apply my patch.

---cut---
Locating the bottom of the address space ... 0x10000
Locating the top of the address space ... 0xc0000000
Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Aborted
---cut---

diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
index ec2b8da..ae950e0 100644
--- a/arch/um/Kconfig.um
+++ b/arch/um/Kconfig.um
@@ -147,3 +147,8 @@ config KERNEL_STACK_ORDER
          This option determines the size of UML kernel stacks.  They will
          be 1 << order pages.  The default is OK unless you're running Valgrind
          on UML, in which case, set this to 3.
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       def_bool y
+
+
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index a3f0b04..3d44535 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -334,7 +334,7 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)regs);
        irq_enter();
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
        irq_exit();
        set_irq_regs(old_regs);
        return 1;

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
@ 2010-09-27 19:48   ` richard -rw- weinberger
  0 siblings, 0 replies; 59+ messages in thread
From: richard -rw- weinberger @ 2010-09-27 19:48 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 8:14 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
>  The following architectures are still using __do_IRQ():
>
>  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>

Maybe I'm naive but shouldn't this path work?
Does um need some extra work?

The linux executable aborts immediately when I apply my patch.

---cut---
Locating the bottom of the address space ... 0x10000
Locating the top of the address space ... 0xc0000000
Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Aborted
---cut---

diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
index ec2b8da..ae950e0 100644
--- a/arch/um/Kconfig.um
+++ b/arch/um/Kconfig.um
@@ -147,3 +147,8 @@ config KERNEL_STACK_ORDER
          This option determines the size of UML kernel stacks.  They will
          be 1 << order pages.  The default is OK unless you're running Valgrind
          on UML, in which case, set this to 3.
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       def_bool y
+
+
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index a3f0b04..3d44535 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -334,7 +334,7 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)regs);
        irq_enter();
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
        irq_exit();
        set_irq_regs(old_regs);
        return 1;
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-27 19:48   ` richard -rw- weinberger
  0 siblings, 0 replies; 59+ messages in thread
From: richard -rw- weinberger @ 2010-09-27 19:48 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Wed, Sep 8, 2010 at 8:14 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
>  The following architectures are still using __do_IRQ():
>
>  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
>

Maybe I'm naive but shouldn't this path work?
Does um need some extra work?

The linux executable aborts immediately when I apply my patch.

---cut---
Locating the bottom of the address space ... 0x10000
Locating the top of the address space ... 0xc0000000
Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Aborted
---cut---

diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
index ec2b8da..ae950e0 100644
--- a/arch/um/Kconfig.um
+++ b/arch/um/Kconfig.um
@@ -147,3 +147,8 @@ config KERNEL_STACK_ORDER
          This option determines the size of UML kernel stacks.  They will
          be 1 << order pages.  The default is OK unless you're running Valgrind
          on UML, in which case, set this to 3.
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       def_bool y
+
+
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index a3f0b04..3d44535 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -334,7 +334,7 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)regs);
        irq_enter();
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
        irq_exit();
        set_irq_regs(old_regs);
        return 1;

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-27 19:48   ` richard -rw- weinberger
@ 2010-09-27 19:54     ` Thomas Gleixner
  -1 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-27 19:54 UTC (permalink / raw)
  To: richard -rw- weinberger
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

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

On Mon, 27 Sep 2010, richard -rw- weinberger wrote:

> On Wed, Sep 8, 2010 at 8:14 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > __do_IRQ() has been deprecated after a two years migration phase in
> >  The following architectures are still using __do_IRQ():
> >
> >  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> >
> 
> Maybe I'm naive but shouldn't this path work?
> Does um need some extra work?

Yes. It needs to set the proper flow handlers. Look for set_irq_chip*
functions and how they are used in other archs.

Thanks,

	tglx

 

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-27 19:54     ` Thomas Gleixner
  0 siblings, 0 replies; 59+ messages in thread
From: Thomas Gleixner @ 2010-09-27 19:54 UTC (permalink / raw)
  To: richard -rw- weinberger
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

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

On Mon, 27 Sep 2010, richard -rw- weinberger wrote:

> On Wed, Sep 8, 2010 at 8:14 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > __do_IRQ() has been deprecated after a two years migration phase in
> >  The following architectures are still using __do_IRQ():
> >
> >  alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> >
> 
> Maybe I'm naive but shouldn't this path work?
> Does um need some extra work?

Yes. It needs to set the proper flow handlers. Look for set_irq_chip*
functions and how they are used in other archs.

Thanks,

	tglx

 

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-27 19:01           ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Luck, Tony
@ 2010-09-29  0:46             ` Kyle McMartin
  -1 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-29  0:46 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

On Mon, Sep 27, 2010 at 12:01:51PM -0700, Luck, Tony wrote:
> > Hmm, why isn't chip->unmask() sufficient ?
>  
> That's a good question.  I'll take a look at what ia64 is doing
> in the ->unmask() and ->end() functions to see if I can fix this
> with some code shuffling.
> 

Did you end up solving this? ia64 iosapic and parisc iosapic still look
fairly similar... I hit the same issue of ->end() not being called in
the handle_level_irq path and ended up just folding in the missing bit
to ->unmask (we were already EOI the IOSAPIC, but missing the EOI for
the parisc cpu.)

--Kyle

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-29  0:46             ` Kyle McMartin
  0 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-29  0:46 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

On Mon, Sep 27, 2010 at 12:01:51PM -0700, Luck, Tony wrote:
> > Hmm, why isn't chip->unmask() sufficient ?
>  
> That's a good question.  I'll take a look at what ia64 is doing
> in the ->unmask() and ->end() functions to see if I can fix this
> with some code shuffling.
> 

Did you end up solving this? ia64 iosapic and parisc iosapic still look
fairly similar... I hit the same issue of ->end() not being called in
the handle_level_irq path and ended up just folding in the missing bit
to ->unmask (we were already EOI the IOSAPIC, but missing the EOI for
the parisc cpu.)

--Kyle

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-29  0:46             ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
@ 2010-09-29  4:55               ` Luck, Tony
  -1 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-29  4:55 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

> Did you end up solving this? ia64 iosapic and parisc iosapic still look
> fairly similar... I hit the same issue of ->end() not being called in
> the handle_level_irq path and ended up just folding in the missing bit
> to ->unmask (we were already EOI the IOSAPIC, but missing the EOI for
> the parisc cpu.)

Kyle,

Yes. Take a look in today's linux-next kernel (tag next-20100929)
for commit: 5d4bff94f9e0877a85b4dc573eb7a3f1d97c13ae

Essentially I just added an "unmask_irq()" call into the ->end
routine, renamed it, and used it as ->unmask.

It seems to work okay - I tried migrating interrupts around by
poking at /proc/irq/NNN/smp_affinity - and that still works.

-Tony

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

* RE: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-29  4:55               ` Luck, Tony
  0 siblings, 0 replies; 59+ messages in thread
From: Luck, Tony @ 2010-09-29  4:55 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, linux-ia64, Yoshinori Sato, Hirokazu Takata,
	Greg Ungerer, Jeff Dike, linux-parisc, Chris Zankel, linux-arch

> Did you end up solving this? ia64 iosapic and parisc iosapic still look
> fairly similar... I hit the same issue of ->end() not being called in
> the handle_level_irq path and ended up just folding in the missing bit
> to ->unmask (we were already EOI the IOSAPIC, but missing the EOI for
> the parisc cpu.)

Kyle,

Yes. Take a look in today's linux-next kernel (tag next-20100929)
for commit: 5d4bff94f9e0877a85b4dc573eb7a3f1d97c13ae

Essentially I just added an "unmask_irq()" call into the ->end
routine, renamed it, and used it as ->unmask.

It seems to work okay - I tried migrating interrupts around by
poking at /proc/irq/NNN/smp_affinity - and that still works.

-Tony

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-29  4:55               ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Luck, Tony
@ 2010-09-29 14:38                 ` Kyle McMartin
  -1 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-29 14:38 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Kyle McMartin, Thomas Gleixner, LKML, Linus Torvalds,
	Andrew Morton, Ingo Molnar, Peter Zijlstra, Christoph Hellwig,
	linux-alpha, linux-cris-kernel, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Tue, Sep 28, 2010 at 09:55:01PM -0700, Luck, Tony wrote:
> Yes. Take a look in today's linux-next kernel (tag next-20100929)
> for commit: 5d4bff94f9e0877a85b4dc573eb7a3f1d97c13ae
> 
> Essentially I just added an "unmask_irq()" call into the ->end
> routine, renamed it, and used it as ->unmask.
> 

Ahh, cool, glad to hear it.

--Kyle

> It seems to work okay - I tried migrating interrupts around by
> poking at /proc/irq/NNN/smp_affinity - and that still works.
> 
> -Tony
> 

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-29 14:38                 ` Kyle McMartin
  0 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-29 14:38 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Kyle McMartin, Thomas Gleixner, LKML, Linus Torvalds,
	Andrew Morton, Ingo Molnar, Peter Zijlstra, Christoph Hellwig,
	linux-alpha, linux-cris-kernel, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch

On Tue, Sep 28, 2010 at 09:55:01PM -0700, Luck, Tony wrote:
> Yes. Take a look in today's linux-next kernel (tag next-20100929)
> for commit: 5d4bff94f9e0877a85b4dc573eb7a3f1d97c13ae
> 
> Essentially I just added an "unmask_irq()" call into the ->end
> routine, renamed it, and used it as ->unmask.
> 

Ahh, cool, glad to hear it.

--Kyle

> It seems to work okay - I tried migrating interrupts around by
> poking at /proc/irq/NNN/smp_affinity - and that still works.
> 
> -Tony
> 

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
@ 2010-09-30  1:26   ` Kyle McMartin
  -1 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-30  1:26 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch, starvik, jesper.nilsson

On Wed, Sep 08, 2010 at 06:14:14PM -0000, Thomas Gleixner wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
> commit 0e57aa1. Since then another 18 month have gone by.
> 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 

In penance while I finish testing what I can on parisc this week
(conversion is done, I just need to find time to plug in ancient crap
 and see if it still handles interrupts...) I've killed __do_IRQ on
cris. Sort of. I have no idea if it builds or anything, but it was
pretty low-hanging fruit since it does all its own masking in its
entry point, so as near as I can tell, aside from disabling spurious
irqs, none of the irq_chip handlers aside from affinity are needed
on cris.

(Since it's masking/unmasking itself, it looks like handle_simple_irq
 will work for the common irqs, and on v32 we can use handle_percpu_irq
 for the timer and ipi.)

Visual compilation at least gives me a logical flow that seems generally
sensible.

I'd appreciate a second pair of eyes, and if it's ok, I'll clean it up
and submit it.

regards, Kyle

---

 arch-v10/kernel/irq.c |   26 +++++---------------------
 arch-v32/kernel/irq.c |   49 ++++++++++++-------------------------------------
 kernel/irq.c          |    2 +-
 3 files changed, 18 insertions(+), 59 deletions(-)

diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c
index a0c0df8..07f17ce 100644
--- a/arch/cris/arch-v10/kernel/irq.c
+++ b/arch/cris/arch-v10/kernel/irq.c
@@ -104,16 +104,6 @@ static void (*interrupt[NR_IRQS])(void) = {
 	IRQ31_interrupt
 };
 
-static void enable_crisv10_irq(unsigned int irq);
-
-static unsigned int startup_crisv10_irq(unsigned int irq)
-{
-	enable_crisv10_irq(irq);
-	return 0;
-}
-
-#define shutdown_crisv10_irq	disable_crisv10_irq
-
 static void enable_crisv10_irq(unsigned int irq)
 {
 	crisv10_unmask_irq(irq);
@@ -124,22 +114,16 @@ static void disable_crisv10_irq(unsigned int irq)
 	crisv10_mask_irq(irq);
 }
 
-static void ack_crisv10_irq(unsigned int irq)
-{
-}
-
-static void end_crisv10_irq(unsigned int irq)
+static void crisv10_noop(unsigned int irq)
 {
 }
 
 static struct irq_chip crisv10_irq_type = {
 	.name =        "CRISv10",
-	.startup =     startup_crisv10_irq,
-	.shutdown =    shutdown_crisv10_irq,
-	.enable =      enable_crisv10_irq,
+	.unmask =      enable_crisv10_irq,
+	.mask =        disable_crisv10_irq,
 	.disable =     disable_crisv10_irq,
-	.ack =         ack_crisv10_irq,
-	.end =         end_crisv10_irq,
+	.ack =         crisv10_noop,
 	.set_affinity = NULL
 };
 
@@ -221,7 +205,7 @@ init_IRQ(void)
 
 	/* Initialize IRQ handler descriptors. */
 	for(i = 2; i < NR_IRQS; i++) {
-		irq_desc[i].chip = &crisv10_irq_type;
+		set_irq_chip_and_handler(i, &crisv10_irq_type, handle_simple_irq);
 		set_int_vector(i, interrupt[i]);
 	}
 
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c
index 2ed48ae..2efc98c 100644
--- a/arch/cris/arch-v32/kernel/irq.c
+++ b/arch/cris/arch-v32/kernel/irq.c
@@ -290,36 +290,6 @@ void crisv32_unmask_irq(int irq)
 	unblock_irq(irq, irq_cpu(irq));
 }
 
-
-static unsigned int startup_crisv32_irq(unsigned int irq)
-{
-	crisv32_unmask_irq(irq);
-	return 0;
-}
-
-static void shutdown_crisv32_irq(unsigned int irq)
-{
-	crisv32_mask_irq(irq);
-}
-
-static void enable_crisv32_irq(unsigned int irq)
-{
-	crisv32_unmask_irq(irq);
-}
-
-static void disable_crisv32_irq(unsigned int irq)
-{
-	crisv32_mask_irq(irq);
-}
-
-static void ack_crisv32_irq(unsigned int irq)
-{
-}
-
-static void end_crisv32_irq(unsigned int irq)
-{
-}
-
 int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest)
 {
 	unsigned long flags;
@@ -330,14 +300,16 @@ int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest)
 	return 0;
 }
 
+static void crisv32_noop(unsigned int irq)
+{
+}
+
 static struct irq_chip crisv32_irq_type = {
 	.name =        "CRISv32",
-	.startup =     startup_crisv32_irq,
-	.shutdown =    shutdown_crisv32_irq,
-	.enable =      enable_crisv32_irq,
-	.disable =     disable_crisv32_irq,
-	.ack =         ack_crisv32_irq,
-	.end =         end_crisv32_irq,
+	.mask =        crisv32_mask_irq,
+	.disable =     crisv32_mask_irq,
+	.unmask =      crisv32_unmask_irq,
+	.ack =         crisv32_noop,
 	.set_affinity = set_affinity_crisv32_irq
 };
 
@@ -472,15 +444,18 @@ init_IRQ(void)
 
 	/* Point all IRQ's to bad handlers. */
 	for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) {
-		irq_desc[j].chip = &crisv32_irq_type;
+		set_irq_chip_and_handler(j, &crisv32_irq_type,
+			handle_simple_irq);
 		set_exception_vector(i, interrupt[j]);
 	}
 
         /* Mark Timer and IPI IRQs as CPU local */
 	irq_allocations[TIMER0_INTR_VECT - FIRST_IRQ].cpu = CPU_FIXED;
 	irq_desc[TIMER0_INTR_VECT].status |= IRQ_PER_CPU;
+	set_irq_handler(TIMER0_INTR_VECT, handle_percpu_irq);
 	irq_allocations[IPI_INTR_VECT - FIRST_IRQ].cpu = CPU_FIXED;
 	irq_desc[IPI_INTR_VECT].status |= IRQ_PER_CPU;
+	set_irq_handler(IPI_INTR_VECT, handle_percpu_irq);
 
 	set_exception_vector(0x00, nmi_interrupt);
 	set_exception_vector(0x30, multiple_interrupt);
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c
index 469f7f9..14d9ce9 100644
--- a/arch/cris/kernel/irq.c
+++ b/arch/cris/kernel/irq.c
@@ -93,7 +93,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
 		printk("do_IRQ: stack overflow: %lX\n", sp);
 		show_stack(NULL, (unsigned long *)sp);
 	}
-	__do_IRQ(irq);
+	generic_handle_irq(irq);
         irq_exit();
 	set_irq_regs(old_regs);
 }

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-30  1:26   ` Kyle McMartin
  0 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-30  1:26 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Linus Torvalds, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-alpha, linux-cris-kernel,
	Haavard Skinnemoen, Tony Luck, linux-ia64, Yoshinori Sato,
	Hirokazu Takata, Greg Ungerer, Jeff Dike, linux-parisc,
	Chris Zankel, linux-arch, starvik, jesper.nilsson

On Wed, Sep 08, 2010 at 06:14:14PM -0000, Thomas Gleixner wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
> commit 0e57aa1. Since then another 18 month have gone by.
> 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 

In penance while I finish testing what I can on parisc this week
(conversion is done, I just need to find time to plug in ancient crap
 and see if it still handles interrupts...) I've killed __do_IRQ on
cris. Sort of. I have no idea if it builds or anything, but it was
pretty low-hanging fruit since it does all its own masking in its
entry point, so as near as I can tell, aside from disabling spurious
irqs, none of the irq_chip handlers aside from affinity are needed
on cris.

(Since it's masking/unmasking itself, it looks like handle_simple_irq
 will work for the common irqs, and on v32 we can use handle_percpu_irq
 for the timer and ipi.)

Visual compilation at least gives me a logical flow that seems generally
sensible.

I'd appreciate a second pair of eyes, and if it's ok, I'll clean it up
and submit it.

regards, Kyle

---

 arch-v10/kernel/irq.c |   26 +++++---------------------
 arch-v32/kernel/irq.c |   49 ++++++++++++-------------------------------------
 kernel/irq.c          |    2 +-
 3 files changed, 18 insertions(+), 59 deletions(-)

diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c
index a0c0df8..07f17ce 100644
--- a/arch/cris/arch-v10/kernel/irq.c
+++ b/arch/cris/arch-v10/kernel/irq.c
@@ -104,16 +104,6 @@ static void (*interrupt[NR_IRQS])(void) = {
 	IRQ31_interrupt
 };
 
-static void enable_crisv10_irq(unsigned int irq);
-
-static unsigned int startup_crisv10_irq(unsigned int irq)
-{
-	enable_crisv10_irq(irq);
-	return 0;
-}
-
-#define shutdown_crisv10_irq	disable_crisv10_irq
-
 static void enable_crisv10_irq(unsigned int irq)
 {
 	crisv10_unmask_irq(irq);
@@ -124,22 +114,16 @@ static void disable_crisv10_irq(unsigned int irq)
 	crisv10_mask_irq(irq);
 }
 
-static void ack_crisv10_irq(unsigned int irq)
-{
-}
-
-static void end_crisv10_irq(unsigned int irq)
+static void crisv10_noop(unsigned int irq)
 {
 }
 
 static struct irq_chip crisv10_irq_type = {
 	.name =        "CRISv10",
-	.startup =     startup_crisv10_irq,
-	.shutdown =    shutdown_crisv10_irq,
-	.enable =      enable_crisv10_irq,
+	.unmask =      enable_crisv10_irq,
+	.mask =        disable_crisv10_irq,
 	.disable =     disable_crisv10_irq,
-	.ack =         ack_crisv10_irq,
-	.end =         end_crisv10_irq,
+	.ack =         crisv10_noop,
 	.set_affinity = NULL
 };
 
@@ -221,7 +205,7 @@ init_IRQ(void)
 
 	/* Initialize IRQ handler descriptors. */
 	for(i = 2; i < NR_IRQS; i++) {
-		irq_desc[i].chip = &crisv10_irq_type;
+		set_irq_chip_and_handler(i, &crisv10_irq_type, handle_simple_irq);
 		set_int_vector(i, interrupt[i]);
 	}
 
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c
index 2ed48ae..2efc98c 100644
--- a/arch/cris/arch-v32/kernel/irq.c
+++ b/arch/cris/arch-v32/kernel/irq.c
@@ -290,36 +290,6 @@ void crisv32_unmask_irq(int irq)
 	unblock_irq(irq, irq_cpu(irq));
 }
 
-
-static unsigned int startup_crisv32_irq(unsigned int irq)
-{
-	crisv32_unmask_irq(irq);
-	return 0;
-}
-
-static void shutdown_crisv32_irq(unsigned int irq)
-{
-	crisv32_mask_irq(irq);
-}
-
-static void enable_crisv32_irq(unsigned int irq)
-{
-	crisv32_unmask_irq(irq);
-}
-
-static void disable_crisv32_irq(unsigned int irq)
-{
-	crisv32_mask_irq(irq);
-}
-
-static void ack_crisv32_irq(unsigned int irq)
-{
-}
-
-static void end_crisv32_irq(unsigned int irq)
-{
-}
-
 int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest)
 {
 	unsigned long flags;
@@ -330,14 +300,16 @@ int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest)
 	return 0;
 }
 
+static void crisv32_noop(unsigned int irq)
+{
+}
+
 static struct irq_chip crisv32_irq_type = {
 	.name =        "CRISv32",
-	.startup =     startup_crisv32_irq,
-	.shutdown =    shutdown_crisv32_irq,
-	.enable =      enable_crisv32_irq,
-	.disable =     disable_crisv32_irq,
-	.ack =         ack_crisv32_irq,
-	.end =         end_crisv32_irq,
+	.mask =        crisv32_mask_irq,
+	.disable =     crisv32_mask_irq,
+	.unmask =      crisv32_unmask_irq,
+	.ack =         crisv32_noop,
 	.set_affinity = set_affinity_crisv32_irq
 };
 
@@ -472,15 +444,18 @@ init_IRQ(void)
 
 	/* Point all IRQ's to bad handlers. */
 	for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) {
-		irq_desc[j].chip = &crisv32_irq_type;
+		set_irq_chip_and_handler(j, &crisv32_irq_type,
+			handle_simple_irq);
 		set_exception_vector(i, interrupt[j]);
 	}
 
         /* Mark Timer and IPI IRQs as CPU local */
 	irq_allocations[TIMER0_INTR_VECT - FIRST_IRQ].cpu = CPU_FIXED;
 	irq_desc[TIMER0_INTR_VECT].status |= IRQ_PER_CPU;
+	set_irq_handler(TIMER0_INTR_VECT, handle_percpu_irq);
 	irq_allocations[IPI_INTR_VECT - FIRST_IRQ].cpu = CPU_FIXED;
 	irq_desc[IPI_INTR_VECT].status |= IRQ_PER_CPU;
+	set_irq_handler(IPI_INTR_VECT, handle_percpu_irq);
 
 	set_exception_vector(0x00, nmi_interrupt);
 	set_exception_vector(0x30, multiple_interrupt);
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c
index 469f7f9..14d9ce9 100644
--- a/arch/cris/kernel/irq.c
+++ b/arch/cris/kernel/irq.c
@@ -93,7 +93,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
 		printk("do_IRQ: stack overflow: %lX\n", sp);
 		show_stack(NULL, (unsigned long *)sp);
 	}
-	__do_IRQ(irq);
+	generic_handle_irq(irq);
         irq_exit();
 	set_irq_regs(old_regs);
 }

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code
  2010-09-30  1:26   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
@ 2010-09-30  2:41     ` Kyle McMartin
  -1 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-30  2:41 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 29, 2010 at 09:26:41PM -0400, Kyle McMartin wrote:
> I'd appreciate a second pair of eyes, and if it's ok, I'll clean it up
> and submit it.
> 

Let's do h8300 while we're at it, since that also /looks/ trivial...
(probably famous last words.)

No idea if it's edge or level or what, but given the handlers that would
be called in the __do_IRQ patch, handle_edge_irq seems most sensible.

Executive summary: kill implied .ack = NULL, rename enable to unmask,
kill empty .end since dummy_irq_chip.end will suit us fine. Kill some
unneeded irq_desc initializers that are also implicit...

Again, if someone could build/boot/whatever test this, that would be
fantastic, and I'll add their Tested-by and submit.

--kyle

---
 irq.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c
index c25dc2c..acdbc07 100644
--- a/arch/h8300/kernel/irq.c
+++ b/arch/h8300/kernel/irq.c
@@ -50,10 +50,6 @@ static void h8300_disable_irq(unsigned int irq)
 		IER_REGS &= ~(1 << (irq - EXT_IRQ0));
 }
 
-static void h8300_end_irq(unsigned int irq)
-{
-}
-
 static unsigned int h8300_startup_irq(unsigned int irq)
 {
 	if (is_ext_irq(irq))
@@ -75,10 +71,9 @@ struct irq_chip h8300irq_chip = {
 	.name		= "H8300-INTC",
 	.startup	= h8300_startup_irq,
 	.shutdown	= h8300_shutdown_irq,
-	.enable		= h8300_enable_irq,
+	.unmask		= h8300_enable_irq,
+	.mask		= h8300_disable_irq,
 	.disable	= h8300_disable_irq,
-	.ack		= NULL,
-	.end		= h8300_end_irq,
 };
 
 #if defined(CONFIG_RAMKERNEL)
@@ -161,17 +156,14 @@ void __init init_IRQ(void)
 	setup_vector();
 
 	for (c = 0; c < NR_IRQS; c++) {
-		irq_desc[c].status = IRQ_DISABLED;
-		irq_desc[c].action = NULL;
-		irq_desc[c].depth = 1;
-		irq_desc[c].chip = &h8300irq_chip;
+		set_irq_chip_and_handler(c, &h8300_irq_chip, handle_edge_irq);
 	}
 }
 
 asmlinkage void do_IRQ(int irq)
 {
 	irq_enter();
-	__do_IRQ(irq);
+	generic_handle_irq(irq);
 	irq_exit();
 }
 

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

* Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
@ 2010-09-30  2:41     ` Kyle McMartin
  0 siblings, 0 replies; 59+ messages in thread
From: Kyle McMartin @ 2010-09-30  2:41 UTC (permalink / raw)
  To: Kyle McMartin
  Cc: Thomas Gleixner, LKML, Linus Torvalds, Andrew Morton,
	Ingo Molnar, Peter Zijlstra, Christoph Hellwig, linux-alpha,
	linux-cris-kernel, Haavard Skinnemoen, Tony Luck, linux-ia64,
	Yoshinori Sato, Hirokazu Takata, Greg Ungerer, Jeff Dike,
	linux-parisc, Chris Zankel, linux-arch

On Wed, Sep 29, 2010 at 09:26:41PM -0400, Kyle McMartin wrote:
> I'd appreciate a second pair of eyes, and if it's ok, I'll clean it up
> and submit it.
> 

Let's do h8300 while we're at it, since that also /looks/ trivial...
(probably famous last words.)

No idea if it's edge or level or what, but given the handlers that would
be called in the __do_IRQ patch, handle_edge_irq seems most sensible.

Executive summary: kill implied .ack = NULL, rename enable to unmask,
kill empty .end since dummy_irq_chip.end will suit us fine. Kill some
unneeded irq_desc initializers that are also implicit...

Again, if someone could build/boot/whatever test this, that would be
fantastic, and I'll add their Tested-by and submit.

--kyle

---
 irq.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c
index c25dc2c..acdbc07 100644
--- a/arch/h8300/kernel/irq.c
+++ b/arch/h8300/kernel/irq.c
@@ -50,10 +50,6 @@ static void h8300_disable_irq(unsigned int irq)
 		IER_REGS &= ~(1 << (irq - EXT_IRQ0));
 }
 
-static void h8300_end_irq(unsigned int irq)
-{
-}
-
 static unsigned int h8300_startup_irq(unsigned int irq)
 {
 	if (is_ext_irq(irq))
@@ -75,10 +71,9 @@ struct irq_chip h8300irq_chip = {
 	.name		= "H8300-INTC",
 	.startup	= h8300_startup_irq,
 	.shutdown	= h8300_shutdown_irq,
-	.enable		= h8300_enable_irq,
+	.unmask		= h8300_enable_irq,
+	.mask		= h8300_disable_irq,
 	.disable	= h8300_disable_irq,
-	.ack		= NULL,
-	.end		= h8300_end_irq,
 };
 
 #if defined(CONFIG_RAMKERNEL)
@@ -161,17 +156,14 @@ void __init init_IRQ(void)
 	setup_vector();
 
 	for (c = 0; c < NR_IRQS; c++) {
-		irq_desc[c].status = IRQ_DISABLED;
-		irq_desc[c].action = NULL;
-		irq_desc[c].depth = 1;
-		irq_desc[c].chip = &h8300irq_chip;
+		set_irq_chip_and_handler(c, &h8300_irq_chip, handle_edge_irq);
 	}
 }
 
 asmlinkage void do_IRQ(int irq)
 {
 	irq_enter();
-	__do_IRQ(irq);
+	generic_handle_irq(irq);
 	irq_exit();
 }
 

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

end of thread, other threads:[~2010-09-30  2:41 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 18:14 [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
2010-09-08 18:14 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
2010-09-08 18:51 ` James Bottomley
2010-09-08 18:51   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing James Bottomley
2010-09-08 19:34   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
2010-09-08 19:34     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
2010-09-08 20:35     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code James Bottomley
2010-09-08 20:35       ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing James Bottomley
2010-09-08 21:35       ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
2010-09-08 21:35         ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
2010-09-08 20:28   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Mike Frysinger
2010-09-08 20:28     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Mike Frysinger
2010-09-08 20:28     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Mike Frysinger
2010-09-08 20:28     ` Mike Frysinger
2010-09-08 18:58 ` Kyle McMartin
2010-09-08 18:58   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
2010-09-08 20:36   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Luck, Tony
2010-09-08 20:36     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Luck, Tony
2010-09-09  7:10 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Mikael Starvik
2010-09-09  7:10   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Mikael Starvik
2010-09-09  7:10   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Mikael Starvik
2010-09-09  7:10   ` Mikael Starvik
2010-09-09  7:10   ` Mikael Starvik
2010-09-09 13:44   ` Dialup Jon Norstog
2010-09-09 13:44     ` Dialup Jon Norstog
2010-09-09  7:21 ` Greg Ungerer
2010-09-09  7:21   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Greg Ungerer
2010-09-09 14:09   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Kyle McMartin
2010-09-09 14:09     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
2010-09-09 23:17     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Greg Ungerer
2010-09-09 23:17       ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Greg Ungerer
2010-09-27 17:36 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Tony Luck
2010-09-27 17:36   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Tony Luck
2010-09-27 17:36   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Tony Luck
2010-09-27 18:01   ` Thomas Gleixner
2010-09-27 18:01     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
2010-09-27 18:39     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Luck, Tony
2010-09-27 18:39       ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Luck, Tony
2010-09-27 18:49       ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
2010-09-27 18:49         ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
2010-09-27 19:01         ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Luck, Tony
2010-09-27 19:01           ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Luck, Tony
2010-09-29  0:46           ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Kyle McMartin
2010-09-29  0:46             ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
2010-09-29  4:55             ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Luck, Tony
2010-09-29  4:55               ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Luck, Tony
2010-09-29 14:38               ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Kyle McMartin
2010-09-29 14:38                 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
2010-09-27 19:48 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code richard -rw- weinberger
2010-09-27 19:48   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing richard -rw- weinberger
2010-09-27 19:48   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code richard -rw- weinberger
2010-09-27 19:48   ` richard -rw- weinberger
2010-09-27 19:54   ` Thomas Gleixner
2010-09-27 19:54     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Thomas Gleixner
2010-09-30  1:26 ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Kyle McMartin
2010-09-30  1:26   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin
2010-09-30  2:41   ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Kyle McMartin
2010-09-30  2:41     ` [RFC trollpatch 1/1] genirq: Remove the fits all and nothing Kyle McMartin

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.