irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h
authorPaul Burton <paul.burton@imgtec.com>
Sun, 13 Aug 2017 04:36:36 +0000 (21:36 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 4 Sep 2017 11:53:14 +0000 (13:53 +0200)
The linux/irqchip/mips-gic.h header is now almost empty. Move the
declarations of gic_get_c0_compare_int(), gic_get_c0_perfcount_int() &
gic_get_c0_fdc_int() to asm/mips-gic.h in order to close in on being
able to delete the former header.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17046/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/generic/irq.c
arch/mips/include/asm/mips-gic.h
arch/mips/mti-malta/malta-time.c
arch/mips/pistachio/time.c
arch/mips/ralink/irq-gic.c
drivers/irqchip/irq-mips-gic.c
include/linux/irqchip/mips-gic.h

index 2d7bf74179d581b5bbee22f53ded16dd73beece2..5322d09dd51b5563d1bf58aa0b31b927c982d080 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/clk-provider.h>
 #include <linux/clocksource.h>
 #include <linux/init.h>
-#include <linux/irqchip/mips-gic.h>
 #include <linux/types.h>
 
 #include <asm/irq.h>
index 27736d7f4aba09e9f6aec20d71ff0f20c4b600d0..a2badf572632d147b1d470f728c029b36fbcf8b4 100644 (file)
@@ -314,4 +314,34 @@ static inline bool mips_gic_present(void)
        return IS_ENABLED(CONFIG_MIPS_GIC) && mips_gic_base;
 }
 
+/**
+ * gic_get_c0_compare_int() - Return cp0 count/compare interrupt virq
+ *
+ * Determine the virq number to use for the coprocessor 0 count/compare
+ * interrupt, which may be routed via the GIC.
+ *
+ * Returns the virq number or a negative error number.
+ */
+extern int gic_get_c0_compare_int(void);
+
+/**
+ * gic_get_c0_perfcount_int() - Return performance counter interrupt virq
+ *
+ * Determine the virq number to use for CPU performance counter interrupts,
+ * which may be routed via the GIC.
+ *
+ * Returns the virq number or a negative error number.
+ */
+extern int gic_get_c0_perfcount_int(void);
+
+/**
+ * gic_get_c0_fdc_int() - Return fast debug channel interrupt virq
+ *
+ * Determine the virq number to use for fast debug channel (FDC) interrupts,
+ * which may be routed via the GIC.
+ *
+ * Returns the virq number or a negative error number.
+ */
+extern int gic_get_c0_fdc_int(void);
+
 #endif /* __MIPS_ASM_MIPS_CPS_H__ */
index 7d53103b085f082e82621acabac86c63a8a6654c..66c866740ff227ed788a4d41f4322aeb5198dd9b 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/sched.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
-#include <linux/irqchip/mips-gic.h>
 #include <linux/timex.h>
 #include <linux/mc146818rtc.h>
 
index 17a0f1dec05bd6bff766f5bbbe446b029deb5b5d..8a6af9b76202bd268c267aafe5164c0855670008 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/clk-provider.h>
 #include <linux/clocksource.h>
 #include <linux/init.h>
-#include <linux/irqchip/mips-gic.h>
 #include <linux/of.h>
 
+#include <asm/mips-cps.h>
 #include <asm/time.h>
 
 unsigned int get_c0_compare_int(void)
index 2058280450b5e5d5cd867edbe1065b3be407fb60..bda576f2cad8b7d24069e068d1172439d181b568 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <linux/of.h>
 #include <linux/irqchip.h>
-#include <linux/irqchip/mips-gic.h>
+#include <asm/mips-cps.h>
 
 int get_c0_perfcount_int(void)
 {
index b444bef6d3c2e770932f4b038719d6fe9481852c..bbf39dcfeda4bc1f67cca6cd47f5609effe10237 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irqchip.h>
-#include <linux/irqchip/mips-gic.h>
 #include <linux/of_address.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
index 113010c8dd8b577a9820c0e9defced8921949559..277d5be03a577ba004da29fe466ba67cb291b99c 100644 (file)
 #define GIC_UMV_SH_COUNTER_31_00_OFS   0x0000
 #define GIC_UMV_SH_COUNTER_63_32_OFS   0x0004
 
-#ifdef CONFIG_MIPS_GIC
-
-extern int gic_get_c0_compare_int(void);
-extern int gic_get_c0_perfcount_int(void);
-extern int gic_get_c0_fdc_int(void);
-
-#endif /* CONFIG_MIPS_GIC */
-
 #endif /* __LINUX_IRQCHIP_MIPS_GIC_H */