[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fe7dcce-97ef-54ad-fc3b-8d23bcaa066a@arm.com>
Date: Tue, 15 Nov 2016 10:42:41 +0000
From: Suzuki K Poulose <suzuki.poulose@....com>
To: Catalin Marinas <catalin.marinas@....com>
CC: <linux-arm-kernel@...ts.infradead.org>, <mark.rutland@....com>,
<ard.biesheuvel@...aro.org>, <marc.zyngier@....com>,
<will.deacon@....com>, <linux-kernel@...r.kernel.org>,
<kvmarm@...ts.cs.columbia.edu>,
"Christoffer Dall" <christoffer.dall@...aro.org>, <nd@....com>
Subject: Re: [PATCH v3 2/2] arm64: Support systems without FP/ASIMD
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
Powered by blists - more mailing lists