From: Suzuki K Poulose <suzuki.poulose@arm.com> To: Catalin Marinas <catalin.marinas@arm.com> Cc: <linux-arm-kernel@lists.infradead.org>, <mark.rutland@arm.com>, <ard.biesheuvel@linaro.org>, <marc.zyngier@arm.com>, <will.deacon@arm.com>, <linux-kernel@vger.kernel.org>, <kvmarm@lists.cs.columbia.edu>, "Christoffer Dall" <christoffer.dall@linaro.org>, <nd@arm.com> Subject: Re: [PATCH v3 2/2] arm64: Support systems without FP/ASIMD Date: Tue, 15 Nov 2016 10:42:41 +0000 [thread overview] Message-ID: <3fe7dcce-97ef-54ad-fc3b-8d23bcaa066a@arm.com> (raw) In-Reply-To: <20161114114858.GB3096@e104818-lin.cambridge.arm.com> 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
next prev parent reply other threads:[~2016-11-15 12:20 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-08 13:56 [PATCH v3 0/2] " Suzuki K Poulose 2016-11-08 13:56 ` [PATCH v3 1/2] arm64: Add hypervisor safe helper for checking constant capabilities Suzuki K Poulose 2016-11-08 18:11 ` Will Deacon 2016-11-08 13:56 ` [PATCH v3 2/2] arm64: Support systems without FP/ASIMD Suzuki K Poulose 2016-11-14 11:48 ` Catalin Marinas 2016-11-15 10:42 ` Suzuki K Poulose [this message] 2016-11-11 13:41 ` [PATCH v3 0/2] " Marc Zyngier 2016-11-14 11:08 ` Catalin Marinas 2016-11-16 18:11 ` Catalin Marinas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3fe7dcce-97ef-54ad-fc3b-8d23bcaa066a@arm.com \ --to=suzuki.poulose@arm.com \ --cc=ard.biesheuvel@linaro.org \ --cc=catalin.marinas@arm.com \ --cc=christoffer.dall@linaro.org \ --cc=kvmarm@lists.cs.columbia.edu \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=marc.zyngier@arm.com \ --cc=mark.rutland@arm.com \ --cc=nd@arm.com \ --cc=will.deacon@arm.com \ --subject='Re: [PATCH v3 2/2] arm64: Support systems without FP/ASIMD' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).