lkml.org 
[lkml]   [2016]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/2] arm64: Support systems without FP/ASIMD
From
Date
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

\
 
 \ /
  Last update: 2016-11-15 13:20    [W:0.056 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site