1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2012 Regents of the University of California
4 * Copyright (C) 2017 SiFive
5 * Copyright (C) 2018 Christoph Hellwig
8 #include <linux/interrupt.h>
9 #include <linux/irqchip.h>
10 #include <linux/irqdomain.h>
11 #include <linux/seq_file.h>
14 int arch_show_interrupts(struct seq_file
*p
, int prec
)
16 show_ipi_stats(p
, prec
);
20 asmlinkage __visible
void __irq_entry
do_IRQ(struct pt_regs
*regs
)
22 struct pt_regs
*old_regs
= set_irq_regs(regs
);
25 switch (regs
->cause
& ~CAUSE_IRQ_FLAG
) {
27 riscv_timer_interrupt();
32 * We only use software interrupts to pass IPIs, so if a non-SMP
33 * system gets one, then we don't know what to do.
35 riscv_software_interrupt();
39 handle_arch_irq(regs
);
42 pr_alert("unexpected interrupt cause 0x%lx", regs
->cause
);
47 set_irq_regs(old_regs
);
50 void __init
init_IRQ(void)