Skip to content

aarch64: fix SME_LUTV2 /proc/cpuinfo flag string (smelutv1 -> smelutv2)#464

Open
EylonKrause wants to merge 1 commit into
google:mainfrom
EylonKrause:fix/aarch64-sme-lutv2-flag
Open

aarch64: fix SME_LUTV2 /proc/cpuinfo flag string (smelutv1 -> smelutv2)#464
EylonKrause wants to merge 1 commit into
google:mainfrom
EylonKrause:fix/aarch64-sme-lutv2-flag

Conversation

@EylonKrause

Copy link
Copy Markdown

Description

The AARCH64_SME_LUTV2 entry in the AArch64 feature table uses "smelutv1" as its /proc/cpuinfo match string, while both its enum name (smelutv2) and its HWCAP2 macro (AARCH64_HWCAP2_SME_LUTV2) are LUTv2. The Linux kernel prints this feature as smelutv2 (KERNEL_HWCAP_SME_LUTV2 in arch/arm64/kernel/cpuinfo.c), so the /proc/cpuinfo string-scan fallback never matches and never sets the SME_LUTV2 bit. It is the sole string-vs-name mismatch among the SME/FP8 entries.

The getauxval(AT_HWCAP2) bit path is unaffected — this only fixes the cpuinfo-scan fallback used when getauxval is unavailable.

Fix

"smelutv1""smelutv2", matching the kernel token and the entry's own name.

I don't have AArch64 hardware to exercise the cpuinfo path at runtime, but the fix is verifiable against the kernel's hwcap string table (linked above) and the entry's name / HWCAP2 macro.

The AARCH64_SME_LUTV2 entry used "smelutv1" as its /proc/cpuinfo match
string, while its enum name (smelutv2) and HWCAP2 macro
(AARCH64_HWCAP2_SME_LUTV2) are both LUTv2. The Linux kernel prints this
feature as "smelutv2" (KERNEL_HWCAP_SME_LUTV2 in
arch/arm64/kernel/cpuinfo.c), so the /proc/cpuinfo string-scan fallback
never matched and never set the SME_LUTV2 bit. It is the sole
string-vs-name mismatch among the SME/FP8 entries. Fix it to "smelutv2".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant