[PATCH 1/5] sparc64: Report unrecognised machine description hwcap-list entries

From: Stian Halseth

Date: Tue Sep 29 2026 - 09:46:11 EST


mdesc_cpu_hwcap_list() matches each string in the cpu node's hwcap-list
against hwcaps[] and crypto_hwcaps[]. A string that matches neither is
skipped silently, so firmware can advertise a capability the kernel has
no name for and nothing reports it.

A SPARC T7-1 (M7) emits 28 entries, of which eight match nothing:

vis3b pause-nsec mwait sparc5 cfr mont xmpmul xmont

Print the ones that are not recognised.

Signed-off-by: Stian Halseth <stian@xxxxxx>
---
arch/sparc/kernel/setup_64.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
index 63615f5c99b47..8ed65ad0e6081 100644
--- a/arch/sparc/kernel/setup_64.c
+++ b/arch/sparc/kernel/setup_64.c
@@ -488,20 +488,28 @@ static unsigned long __init mdesc_cpu_hwcap_list(void)

while (len) {
int i, plen;
+ bool known = false;

for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
unsigned long bit = 1UL << i;

if (hwcaps[i] && !strcmp(prop, hwcaps[i])) {
caps |= bit;
+ known = true;
break;
}
}
for (i = 0; i < ARRAY_SIZE(crypto_hwcaps); i++) {
- if (!strcmp(prop, crypto_hwcaps[i]))
+ if (!strcmp(prop, crypto_hwcaps[i])) {
caps |= HWCAP_SPARC_CRYPTO;
+ known = true;
+ }
}

+ if (!known)
+ pr_info("CPU CAPS: unknown hwcap-list entry '%s'\n",
+ prop);
+
plen = strlen(prop) + 1;
prop += plen;
len -= plen;
--
2.43.0