Skip to content

Commit 0f84c30

Browse files
abresticralfbaechle
authored andcommitted
MIPS: Always use IRQ domains for CPU IRQs
Use an IRQ domain for the 8 CPU IRQs in both the DT and non-DT cases. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Reviewed-by: Qais Yousef <qais.yousef@imgtec.com> Tested-by: Qais Yousef <qais.yousef@imgtec.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Jeffrey Deans <jeffrey.deans@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Qais Yousef <qais.yousef@imgtec.com> Cc: Jonas Gorski <jogo@openwrt.org> Cc: John Crispin <blogic@openwrt.org> Cc: David Daney <ddaney.cavm@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/7799/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 97f4ad2 commit 0f84c30

File tree

2 files changed

+12
-25
lines changed

2 files changed

+12
-25
lines changed

arch/mips/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,7 @@ config MIPS_HUGE_TLB_SUPPORT
10551055

10561056
config IRQ_CPU
10571057
bool
1058+
select IRQ_DOMAIN
10581059

10591060
config IRQ_CPU_RM7K
10601061
bool

arch/mips/kernel/irq_cpu.c

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -94,28 +94,6 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
9494
.irq_eoi = unmask_mips_irq,
9595
};
9696

97-
void __init mips_cpu_irq_init(void)
98-
{
99-
int irq_base = MIPS_CPU_IRQ_BASE;
100-
int i;
101-
102-
/* Mask interrupts. */
103-
clear_c0_status(ST0_IM);
104-
clear_c0_cause(CAUSEF_IP);
105-
106-
/* Software interrupts are used for MT/CMT IPI */
107-
for (i = irq_base; i < irq_base + 2; i++)
108-
irq_set_chip_and_handler(i, cpu_has_mipsmt ?
109-
&mips_mt_cpu_irq_controller :
110-
&mips_cpu_irq_controller,
111-
handle_percpu_irq);
112-
113-
for (i = irq_base + 2; i < irq_base + 8; i++)
114-
irq_set_chip_and_handler(i, &mips_cpu_irq_controller,
115-
handle_percpu_irq);
116-
}
117-
118-
#ifdef CONFIG_IRQ_DOMAIN
11997
static int mips_cpu_intc_map(struct irq_domain *d, unsigned int irq,
12098
irq_hw_number_t hw)
12199
{
@@ -138,8 +116,7 @@ static const struct irq_domain_ops mips_cpu_intc_irq_domain_ops = {
138116
.xlate = irq_domain_xlate_onecell,
139117
};
140118

141-
int __init mips_cpu_intc_init(struct device_node *of_node,
142-
struct device_node *parent)
119+
static void __init __mips_cpu_irq_init(struct device_node *of_node)
143120
{
144121
struct irq_domain *domain;
145122

@@ -151,7 +128,16 @@ int __init mips_cpu_intc_init(struct device_node *of_node,
151128
&mips_cpu_intc_irq_domain_ops, NULL);
152129
if (!domain)
153130
panic("Failed to add irqdomain for MIPS CPU");
131+
}
132+
133+
void __init mips_cpu_irq_init(void)
134+
{
135+
__mips_cpu_irq_init(NULL);
136+
}
154137

138+
int __init mips_cpu_intc_init(struct device_node *of_node,
139+
struct device_node *parent)
140+
{
141+
__mips_cpu_irq_init(of_node);
155142
return 0;
156143
}
157-
#endif /* CONFIG_IRQ_DOMAIN */

0 commit comments

Comments
 (0)