]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cpufeature: remove duplicate ID_AA64ISAR2_EL1 entry
authorKristina Martsenko <kristina.martsenko@arm.com>
Wed, 11 May 2022 16:20:30 +0000 (17:20 +0100)
committerWill Deacon <will@kernel.org>
Thu, 12 May 2022 10:21:29 +0000 (11:21 +0100)
commit0e6c0bce0fef9f129685463d43f97306ce11681e
treefbbf212821f0ff491a2effc224759d8d74b74b25
parent23c1338c78d65c54029f17702f9c61cf296f07d5
arm64: cpufeature: remove duplicate ID_AA64ISAR2_EL1 entry

The ID register table should have one entry per ID register but
currently has two entries for ID_AA64ISAR2_EL1. Only one entry has an
override, and get_arm64_ftr_reg() can end up choosing the other, causing
the override to be ignored. Fix this by removing the duplicate entry.

While here, also make the check in sort_ftr_regs() more strict so that
duplicate entries can't be added in the future.

Fixes: 1c6893a931b9 ("arm64: Add support of PAuth QARMA3 architected algorithm")
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20220511162030.1403386-1-kristina.martsenko@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/cpufeature.c