Skip to content

Commit 98c953a

Browse files
committed
Revert "MIPS: Lantiq: Fix cascaded IRQ setup"
This reverts commit 6280ac9 which is commit 6c356eda225e3ee134ed4176b9ae3a76f793f4dd upstream. It shouldn't have been included in a stable release. Reported-by: Amit Pundir <amit.pundir@linaro.org> Cc: Felix Fietkau <nbd@nbd.name> Cc: John Crispin <john@phrozen.org> Cc: James Hogan <james.hogan@imgtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a32c533 commit 98c953a

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

arch/mips/lantiq/irq.c

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,6 @@ static void ltq_hw5_irqdispatch(void)
269269
DEFINE_HWx_IRQDISPATCH(5)
270270
#endif
271271

272-
static void ltq_hw_irq_handler(struct irq_desc *desc)
273-
{
274-
ltq_hw_irqdispatch(irq_desc_get_irq(desc) - 2);
275-
}
276-
277272
#ifdef CONFIG_MIPS_MT_SMP
278273
void __init arch_init_ipiirq(int irq, struct irqaction *action)
279274
{
@@ -318,19 +313,23 @@ static struct irqaction irq_call = {
318313
asmlinkage void plat_irq_dispatch(void)
319314
{
320315
unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
321-
int irq;
322-
323-
if (!pending) {
324-
spurious_interrupt();
325-
return;
316+
unsigned int i;
317+
318+
if ((MIPS_CPU_TIMER_IRQ == 7) && (pending & CAUSEF_IP7)) {
319+
do_IRQ(MIPS_CPU_TIMER_IRQ);
320+
goto out;
321+
} else {
322+
for (i = 0; i < MAX_IM; i++) {
323+
if (pending & (CAUSEF_IP2 << i)) {
324+
ltq_hw_irqdispatch(i);
325+
goto out;
326+
}
327+
}
326328
}
329+
pr_alert("Spurious IRQ: CAUSE=0x%08x\n", read_c0_status());
327330

328-
pending >>= CAUSEB_IP;
329-
while (pending) {
330-
irq = fls(pending) - 1;
331-
do_IRQ(MIPS_CPU_IRQ_BASE + irq);
332-
pending &= ~BIT(irq);
333-
}
331+
out:
332+
return;
334333
}
335334

336335
static int icu_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
@@ -355,6 +354,11 @@ static const struct irq_domain_ops irq_domain_ops = {
355354
.map = icu_map,
356355
};
357356

357+
static struct irqaction cascade = {
358+
.handler = no_action,
359+
.name = "cascade",
360+
};
361+
358362
int __init icu_of_init(struct device_node *node, struct device_node *parent)
359363
{
360364
struct device_node *eiu_node;
@@ -386,7 +390,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
386390
mips_cpu_irq_init();
387391

388392
for (i = 0; i < MAX_IM; i++)
389-
irq_set_chained_handler(i + 2, ltq_hw_irq_handler);
393+
setup_irq(i + 2, &cascade);
390394

391395
if (cpu_has_vint) {
392396
pr_info("Setting up vectored interrupts\n");

0 commit comments

Comments
 (0)