From: Zhang Kunbo During the backport of a75ad2fc76a2 ("arm64: Filter out SME hwcaps when FEAT_SME isn't implemented") to v6.6, the I8I32 hwcap entry was mangled into: HWCAP_CAP(ID_MATCH_ID(has_sme_feature, AA64SMFR0_EL1, I8I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I8I32), which uses the wrong macro (HWCAP_CAP() instead of HWCAP_CAP_MATCH_ID()), references a nonexistent ID_MATCH_ID, drops the ID_ prefix from the register name, and leaves the argument list unterminated, breaking the build as soon as CONFIG_ARM64_SME is selected: arch/arm64/kernel/cpufeature.c:2899:2: error: unterminated argument list invoking macro "HWCAP_CAP" The error has gone unnoticed because the entry sits inside CONFIG_ARM64_SME, and SME has depended on BROKEN since it was disabled in v6.6.61, so this code has never been built. It breaks the build for anyone re-enabling SME on top of 6.6.y, e.g. distros backporting the upstream SME fixes. Fix it to use HWCAP_CAP_MATCH_ID() with the ID_AA64SMFR0_EL1 register, matching the surrounding SME hwcap entries and the backports of the same change to 6.12.y and 6.15.y. Mainline is not affected; this was introduced by the v6.6 backport. Fixes: d5024dc5e644 ("arm64: Filter out SME hwcaps when FEAT_SME isn't implemented") Signed-off-by: Zhang Kunbo Cc: Mark Brown Cc: Catalin Marinas Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Sasha Levin Cc: stable@vger.kernel.org --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 5db25bfb854f..ab60dc4dd9e7 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -2896,7 +2896,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = { HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, I16I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I16I32), HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, B16B16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_B16B16), HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F16F16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F16F16), - HWCAP_CAP(ID_MATCH_ID(has_sme_feature, AA64SMFR0_EL1, I8I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I8I32), + HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, I8I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I8I32), HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F16F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F16F32), HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, B16F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_B16F32), HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, BI32I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_BI32I32), -- 2.54.0