Skip to content

Commit dd01635

Browse files
paulburtonralfbaechle
authored andcommitted
irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h
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>
1 parent 56d7b61 commit dd01635

7 files changed

Lines changed: 32 additions & 13 deletions

File tree

‎arch/mips/generic/irq.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <linux/clk-provider.h>
1313
#include <linux/clocksource.h>
1414
#include <linux/init.h>
15-
#include <linux/irqchip/mips-gic.h>
1615
#include <linux/types.h>
1716

1817
#include <asm/irq.h>

‎arch/mips/include/asm/mips-gic.h‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,4 +314,34 @@ static inline bool mips_gic_present(void)
314314
return IS_ENABLED(CONFIG_MIPS_GIC) && mips_gic_base;
315315
}
316316

317+
/**
318+
* gic_get_c0_compare_int() - Return cp0 count/compare interrupt virq
319+
*
320+
* Determine the virq number to use for the coprocessor 0 count/compare
321+
* interrupt, which may be routed via the GIC.
322+
*
323+
* Returns the virq number or a negative error number.
324+
*/
325+
extern int gic_get_c0_compare_int(void);
326+
327+
/**
328+
* gic_get_c0_perfcount_int() - Return performance counter interrupt virq
329+
*
330+
* Determine the virq number to use for CPU performance counter interrupts,
331+
* which may be routed via the GIC.
332+
*
333+
* Returns the virq number or a negative error number.
334+
*/
335+
extern int gic_get_c0_perfcount_int(void);
336+
337+
/**
338+
* gic_get_c0_fdc_int() - Return fast debug channel interrupt virq
339+
*
340+
* Determine the virq number to use for fast debug channel (FDC) interrupts,
341+
* which may be routed via the GIC.
342+
*
343+
* Returns the virq number or a negative error number.
344+
*/
345+
extern int gic_get_c0_fdc_int(void);
346+
317347
#endif /* __MIPS_ASM_MIPS_CPS_H__ */

‎arch/mips/mti-malta/malta-time.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <linux/sched.h>
2727
#include <linux/spinlock.h>
2828
#include <linux/interrupt.h>
29-
#include <linux/irqchip/mips-gic.h>
3029
#include <linux/timex.h>
3130
#include <linux/mc146818rtc.h>
3231

‎arch/mips/pistachio/time.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#include <linux/clk-provider.h>
1313
#include <linux/clocksource.h>
1414
#include <linux/init.h>
15-
#include <linux/irqchip/mips-gic.h>
1615
#include <linux/of.h>
1716

17+
#include <asm/mips-cps.h>
1818
#include <asm/time.h>
1919

2020
unsigned int get_c0_compare_int(void)

‎arch/mips/ralink/irq-gic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <linux/of.h>
1313
#include <linux/irqchip.h>
14-
#include <linux/irqchip/mips-gic.h>
14+
#include <asm/mips-cps.h>
1515

1616
int get_c0_perfcount_int(void)
1717
{

‎drivers/irqchip/irq-mips-gic.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <linux/interrupt.h>
1313
#include <linux/irq.h>
1414
#include <linux/irqchip.h>
15-
#include <linux/irqchip/mips-gic.h>
1615
#include <linux/of_address.h>
1716
#include <linux/sched.h>
1817
#include <linux/smp.h>

‎include/linux/irqchip/mips-gic.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,4 @@
1515
#define GIC_UMV_SH_COUNTER_31_00_OFS 0x0000
1616
#define GIC_UMV_SH_COUNTER_63_32_OFS 0x0004
1717

18-
#ifdef CONFIG_MIPS_GIC
19-
20-
extern int gic_get_c0_compare_int(void);
21-
extern int gic_get_c0_perfcount_int(void);
22-
extern int gic_get_c0_fdc_int(void);
23-
24-
#endif /* CONFIG_MIPS_GIC */
25-
2618
#endif /* __LINUX_IRQCHIP_MIPS_GIC_H */

0 commit comments

Comments
 (0)