Re: [PATCH v1 1/5] LoongArch: Define format for AM{SWAP/ADD}.{B/H}, DBAR and BSTRINS.D

From: Tiezhu Yang

Date: Wed Apr 01 2026 - 22:49:18 EST


On 2026/4/1 下午4:23, bot+bpf-ci@xxxxxxxxxx wrote:
diff --git a/arch/loongarch/kernel/cpu-probe.c b/arch/loongarch/kernel/cpu-probe.c
index 657bbae6c1c7..93466fc7d33d 100644
--- a/arch/loongarch/kernel/cpu-probe.c
+++ b/arch/loongarch/kernel/cpu-probe.c
@@ -177,6 +177,10 @@ static void cpu_probe_common(struct cpuinfo_loongarch *c)
c->options |= LOONGARCH_CPU_LAM;
elf_hwcap |= HWCAP_LOONGARCH_LAM;
}
+ if (config & CPUCFG2_LAM_BH) {
+ c->options |= LOONGARCH_CPU_LAM_BH;
+ elf_hwcap |= HWCAP_LOONGARCH_LAM_BH;
+ }

Should there be a corresponding entry in the "Features" line of
/proc/cpuinfo for the new lam_bh capability?

Every other feature that sets elf_hwcap in cpu_probe_common() also
has a matching seq_puts() in show_cpuinfo() in proc.c:

arch/loongarch/kernel/proc.c:show_cpuinfo() {
...
if (cpu_has_lam)
seq_puts(m, " lam");
if (cpu_has_scq)
seq_puts(m, " scq");
...
}

The new cpu_has_lam_bh is missing from this list.

Yes, I think so, thank you.
I will wait for more comments before sending v2.

Thanks,
Tiezhu