On 14/11/16 11:48, Catalin Marinas wrote:
Hi Suzuki,
+static inline bool system_supports_fpsimd(void) +{ + return !cpus_have_const_cap(ARM64_HAS_NO_FPSIMD); +}Any particular reason why using negation instead of a ARM64_HAS_FPSIMD? A potential problem would be the default cpus_have_const_cap() implementation and the default static key having a slight performance impact.
The negation was chosen to avoid hotpatching in the most common case. But as you said, it has an impact on the other side. I think doing a one time hotpatching at boot time is more optimal than penalising a bunch of other users throughout the execution. I will take a look at changing it back to a ARM64_HAS_FPSIMD.
}, + { + /* FP/SIMD is not implemented */ + .capability = ARM64_HAS_NO_FPSIMD, + .def_scope = SCOPE_SYSTEM, + .min_field_value = 0, + .matches = has_no_fpsimd, + },If we go for negation, I don't think we need a min_field_value at all, the matching is done by the has_no_fpsimd() function.
You're right. Suzuki _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
