aarch64: fix SME_LUTV2 /proc/cpuinfo flag string (smelutv1 -> smelutv2)#464
Open
EylonKrause wants to merge 1 commit into
Open
aarch64: fix SME_LUTV2 /proc/cpuinfo flag string (smelutv1 -> smelutv2)#464EylonKrause wants to merge 1 commit into
EylonKrause wants to merge 1 commit into
Conversation
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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
AARCH64_SME_LUTV2entry in the AArch64 feature table uses"smelutv1"as its/proc/cpuinfomatch string, while both its enum name (smelutv2) and its HWCAP2 macro (AARCH64_HWCAP2_SME_LUTV2) are LUTv2. The Linux kernel prints this feature assmelutv2(KERNEL_HWCAP_SME_LUTV2inarch/arm64/kernel/cpuinfo.c), so the/proc/cpuinfostring-scan fallback never matches and never sets theSME_LUTV2bit. 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 whengetauxvalis 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.