[PATCH v1] LoongArch: Expose msgint and avecint in /proc/cpuinfo
From: Tiezhu Yang
Date: Tue Nov 24 2026 - 21:40:09 EST
Expose the msgint (cpu_has_msgint) and avecint (cpu_has_avecint) feature
flags in the Features line of /proc/cpuinfo.
Having both flags visible in userspace makes it straightforward to check
whether the CPU hardware supports message interrupts versus whether AVEC
is actually enabled by firmware and exposed via IOCSR.
Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
---
arch/loongarch/kernel/proc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/loongarch/kernel/proc.c b/arch/loongarch/kernel/proc.c
index 37e9b144ec09..df0ce4e4bdc2 100644
--- a/arch/loongarch/kernel/proc.c
+++ b/arch/loongarch/kernel/proc.c
@@ -98,6 +98,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_puts(m, " lbt_arm");
if (cpu_has_lbt_mips)
seq_puts(m, " lbt_mips");
+ if (cpu_has_msgint)
+ seq_puts(m, " msgint");
+ if (cpu_has_avecint)
+ seq_puts(m, " avecint");
seq_puts(m, "\n");
seq_printf(m, "Hardware Watchpoint\t: %s", str_yes_no(cpu_has_watch));
--
2.42.0