|
@@ -854,15 +854,29 @@ static bool has_no_fpsimd(const struct arm64_cpu_capabilities *entry, int __unus
|
|
}
|
|
}
|
|
|
|
|
|
static bool has_cache_idc(const struct arm64_cpu_capabilities *entry,
|
|
static bool has_cache_idc(const struct arm64_cpu_capabilities *entry,
|
|
- int __unused)
|
|
|
|
|
|
+ int scope)
|
|
{
|
|
{
|
|
- return read_sanitised_ftr_reg(SYS_CTR_EL0) & BIT(CTR_IDC_SHIFT);
|
|
|
|
|
|
+ u64 ctr;
|
|
|
|
+
|
|
|
|
+ if (scope == SCOPE_SYSTEM)
|
|
|
|
+ ctr = arm64_ftr_reg_ctrel0.sys_val;
|
|
|
|
+ else
|
|
|
|
+ ctr = read_cpuid_cachetype();
|
|
|
|
+
|
|
|
|
+ return ctr & BIT(CTR_IDC_SHIFT);
|
|
}
|
|
}
|
|
|
|
|
|
static bool has_cache_dic(const struct arm64_cpu_capabilities *entry,
|
|
static bool has_cache_dic(const struct arm64_cpu_capabilities *entry,
|
|
- int __unused)
|
|
|
|
|
|
+ int scope)
|
|
{
|
|
{
|
|
- return read_sanitised_ftr_reg(SYS_CTR_EL0) & BIT(CTR_DIC_SHIFT);
|
|
|
|
|
|
+ u64 ctr;
|
|
|
|
+
|
|
|
|
+ if (scope == SCOPE_SYSTEM)
|
|
|
|
+ ctr = arm64_ftr_reg_ctrel0.sys_val;
|
|
|
|
+ else
|
|
|
|
+ ctr = read_cpuid_cachetype();
|
|
|
|
+
|
|
|
|
+ return ctr & BIT(CTR_DIC_SHIFT);
|
|
}
|
|
}
|
|
|
|
|
|
static bool __maybe_unused
|
|
static bool __maybe_unused
|