linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: ath79: irq: Remove the include of drivers/irqchip/irqchip.h
@ 2015-07-08 18:11 Alban Bedel
  2015-07-08 18:28 ` Jonas Gorski
  2015-07-11 20:36 ` Thomas Gleixner
  0 siblings, 2 replies; 3+ messages in thread
From: Alban Bedel @ 2015-07-08 18:11 UTC (permalink / raw)
  To: linux-mips
  Cc: Thomas Gleixner, Ralf Baechle, Andrew Bresticker, Qais Yousef,
	linux-kernel, Alban Bedel

We shouldn't include irqchip.h from outside of the drivers/irqchip
directory. The irq driver should idealy be there, however this not
trivial at the moment. We still need to support platforms without DT
support and the interface to the DDR controller still use a custom
arch specific API.

For now just redefine the IRQCHIP_DECLARE macro to avoid the cross
tree include.

Signed-off-by: Alban Bedel <albeu@free.fr>
---
 arch/mips/ath79/irq.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c
index afb0096..c5ad737 100644
--- a/arch/mips/ath79/irq.c
+++ b/arch/mips/ath79/irq.c
@@ -17,7 +17,6 @@
 #include <linux/interrupt.h>
 #include <linux/irqchip.h>
 #include <linux/of_irq.h>
-#include "../../../drivers/irqchip/irqchip.h"
 
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
@@ -272,6 +271,13 @@ asmlinkage void plat_irq_dispatch(void)
 }
 
 #ifdef CONFIG_IRQCHIP
+/*
+ * We cannot use the IRQCHIP_DECLARE macro that lives in
+ * drivers/irqchip, so we're forced to roll our own. Not very nice,
+ * but should do until this code is moved to drivers/irqchip.
+ */
+#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
+
 static int misc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
 {
 	irq_set_chip_and_handler(irq, &ath79_misc_irq_chip, handle_level_irq);
-- 
2.0.0


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

* Re: [PATCH] MIPS: ath79: irq: Remove the include of drivers/irqchip/irqchip.h
  2015-07-08 18:11 [PATCH] MIPS: ath79: irq: Remove the include of drivers/irqchip/irqchip.h Alban Bedel
@ 2015-07-08 18:28 ` Jonas Gorski
  2015-07-11 20:36 ` Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: Jonas Gorski @ 2015-07-08 18:28 UTC (permalink / raw)
  To: Alban Bedel
  Cc: MIPS Mailing List, Thomas Gleixner, Ralf Baechle,
	Andrew Bresticker, Qais Yousef, linux-kernel

On Wed, Jul 8, 2015 at 8:11 PM, Alban Bedel <albeu@free.fr> wrote:
> We shouldn't include irqchip.h from outside of the drivers/irqchip
> directory. The irq driver should idealy be there, however this not
> trivial at the moment. We still need to support platforms without DT
> support and the interface to the DDR controller still use a custom
> arch specific API.
>
> For now just redefine the IRQCHIP_DECLARE macro to avoid the cross
> tree include.
>
> Signed-off-by: Alban Bedel <albeu@free.fr>

The define was moved into linux/irqchip.h in
91e20b5040c67c51aad88cf87db4305c5bd7f79d, so all you can/need to do is
...
> ---
>  arch/mips/ath79/irq.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c
> index afb0096..c5ad737 100644
> --- a/arch/mips/ath79/irq.c
> +++ b/arch/mips/ath79/irq.c
> @@ -17,7 +17,6 @@
>  #include <linux/interrupt.h>
>  #include <linux/irqchip.h>
>  #include <linux/of_irq.h>
> -#include "../../../drivers/irqchip/irqchip.h"
>
>  #include <asm/irq_cpu.h>
>  #include <asm/mipsregs.h>

this removal ;)


Jonas

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

* Re: [PATCH] MIPS: ath79: irq: Remove the include of drivers/irqchip/irqchip.h
  2015-07-08 18:11 [PATCH] MIPS: ath79: irq: Remove the include of drivers/irqchip/irqchip.h Alban Bedel
  2015-07-08 18:28 ` Jonas Gorski
@ 2015-07-11 20:36 ` Thomas Gleixner
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2015-07-11 20:36 UTC (permalink / raw)
  To: Alban Bedel
  Cc: linux-mips, Ralf Baechle, Andrew Bresticker, Qais Yousef, linux-kernel

On Wed, 8 Jul 2015, Alban Bedel wrote:
> We shouldn't include irqchip.h from outside of the drivers/irqchip
> directory. The irq driver should idealy be there, however this not
> trivial at the moment. We still need to support platforms without DT
> support and the interface to the DDR controller still use a custom
> arch specific API.
> 
> For now just redefine the IRQCHIP_DECLARE macro to avoid the cross
> tree include.

The macro has been moved to linux/irqchip.h.

But even if it would still be in drivers/irqchip such a redefine is
even worse than the ../../... include. And the proper solution from
the very beginning would have been to move the macro to the global
header instead of this horrible include.

Sigh,

	tglx

 

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

end of thread, other threads:[~2015-07-11 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 18:11 [PATCH] MIPS: ath79: irq: Remove the include of drivers/irqchip/irqchip.h Alban Bedel
2015-07-08 18:28 ` Jonas Gorski
2015-07-11 20:36 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).