@@ -472,12 +472,7 @@ static bool
472
472
has_cortex_a76_erratum_1463225 (const struct arm64_cpu_capabilities * entry ,
473
473
int scope )
474
474
{
475
- u32 midr = read_cpuid_id ();
476
- /* Cortex-A76 r0p0 - r3p1 */
477
- struct midr_range range = MIDR_RANGE (MIDR_CORTEX_A76 , 0 , 0 , 3 , 1 );
478
-
479
- WARN_ON (scope != SCOPE_LOCAL_CPU || preemptible ());
480
- return is_midr_in_range (midr , & range ) && is_kernel_in_hyp_mode ();
475
+ return is_affected_midr_range_list (entry , scope ) && is_kernel_in_hyp_mode ();
481
476
}
482
477
#endif
483
478
@@ -728,6 +723,8 @@ static const struct midr_range erratum_1418040_list[] = {
728
723
MIDR_RANGE (MIDR_CORTEX_A76 , 0 , 0 , 3 , 1 ),
729
724
/* Neoverse-N1 r0p0 to r3p1 */
730
725
MIDR_RANGE (MIDR_NEOVERSE_N1 , 0 , 0 , 3 , 1 ),
726
+ /* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */
727
+ MIDR_RANGE (MIDR_QCOM_KRYO_4XX_GOLD , 0xc , 0xe , 0xf , 0xf ),
731
728
{},
732
729
};
733
730
#endif
@@ -777,6 +774,15 @@ static const struct midr_range erratum_speculative_at_list[] = {
777
774
};
778
775
#endif
779
776
777
+ #ifdef CONFIG_ARM64_ERRATUM_1463225
778
+ static const struct midr_range erratum_1463225 [] = {
779
+ /* Cortex-A76 r0p0 - r3p1 */
780
+ MIDR_RANGE (MIDR_CORTEX_A76 , 0 , 0 , 3 , 1 ),
781
+ /* Kryo4xx Gold (rcpe to rfpf) => (r0p0 to r3p1) */
782
+ MIDR_RANGE (MIDR_QCOM_KRYO_4XX_GOLD , 0xc , 0xe , 0xf , 0xf ),
783
+ };
784
+ #endif
785
+
780
786
const struct arm64_cpu_capabilities arm64_errata [] = {
781
787
#ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE
782
788
{
@@ -916,6 +922,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
916
922
.capability = ARM64_WORKAROUND_1463225 ,
917
923
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM ,
918
924
.matches = has_cortex_a76_erratum_1463225 ,
925
+ .midr_range_list = erratum_1463225 ,
919
926
},
920
927
#endif
921
928
#ifdef CONFIG_CAVIUM_TX2_ERRATUM_219
0 commit comments