From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 11 Dec 2023 08:20:59 +0000
Subject: [PATCH] kernel_5.10 no rt
---
kernel/arch/riscv/kernel/irq.c | 49 +++++++------------------------------------------
1 files changed, 7 insertions(+), 42 deletions(-)
diff --git a/kernel/arch/riscv/kernel/irq.c b/kernel/arch/riscv/kernel/irq.c
index 0cfac48..7207fa0 100644
--- a/kernel/arch/riscv/kernel/irq.c
+++ b/kernel/arch/riscv/kernel/irq.c
@@ -7,53 +7,18 @@
#include <linux/interrupt.h>
#include <linux/irqchip.h>
-#include <linux/irqdomain.h>
+#include <linux/seq_file.h>
+#include <asm/smp.h>
-/*
- * Possible interrupt causes:
- */
-#define INTERRUPT_CAUSE_SOFTWARE 1
-#define INTERRUPT_CAUSE_TIMER 5
-#define INTERRUPT_CAUSE_EXTERNAL 9
-
-/*
- * The high order bit of the trap cause register is always set for
- * interrupts, which allows us to differentiate them from exceptions
- * quickly. The INTERRUPT_CAUSE_* macros don't contain that bit, so we
- * need to mask it off.
- */
-#define INTERRUPT_CAUSE_FLAG (1UL << (__riscv_xlen - 1))
-
-asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs, unsigned long cause)
+int arch_show_interrupts(struct seq_file *p, int prec)
{
- struct pt_regs *old_regs = set_irq_regs(regs);
-
- irq_enter();
- switch (cause & ~INTERRUPT_CAUSE_FLAG) {
- case INTERRUPT_CAUSE_TIMER:
- riscv_timer_interrupt();
- break;
-#ifdef CONFIG_SMP
- case INTERRUPT_CAUSE_SOFTWARE:
- /*
- * We only use software interrupts to pass IPIs, so if a non-SMP
- * system gets one, then we don't know what to do.
- */
- riscv_software_interrupt();
- break;
-#endif
- case INTERRUPT_CAUSE_EXTERNAL:
- handle_arch_irq(regs);
- break;
- default:
- panic("unexpected interrupt cause");
- }
- irq_exit();
-
- set_irq_regs(old_regs);
+ show_ipi_stats(p, prec);
+ return 0;
}
void __init init_IRQ(void)
{
irqchip_init();
+ if (!handle_arch_irq)
+ panic("No interrupt controller found.");
}
--
Gitblit v1.6.2