[BUG] [openEuler-1.0-LTS] "CPU features: enabling workaround for Mismatched cache type"

I've seen the following kernel log when booting openEuler-1.0-LTS on my kunpeng-920: "CPU features: enabling workaround for Mismatched cache type" whilst all the CPUs in the system actually expose the *same* CTR_EL0 values, i.e., 0x0000000084448004. The following piece of code looks quite broken because ... |static bool |has_mismatched_cache_type(const struct arm64_cpu_capabilities *entry, | int scope) |{ | u64 mask = arm64_ftr_reg_ctrel0.strict_mask; | | /* Skip matching the min line sizes for cache type check */ | if (entry->capability == ARM64_MISMATCHED_CACHE_TYPE) | mask ^= arm64_ftr_reg_ctrel0.strict_mask; ... 'mask' is always set to 0 during the detection of "Mismatched cache type" but we actually want to check the whole *strict_mask*. If I understand it correctly, backporting upstream commit 880f7cc47265 ("arm64: cpu_errata: Remove ARM64_MISMATCHED_CACHE_LINE_SIZE") is the right thing to do here. But please have a look. Zenghui
-
Zenghui Yu