From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: Re: [PATCH v3 16/28] arm64/sve: Probe SVE capabilities and usable vector lengths Date: Wed, 11 Oct 2017 17:55:08 +0100 Message-ID: <20171011165508.runtc4rkipdg2kdw@armageddon.cambridge.arm.com> References: <1507660725-7986-1-git-send-email-Dave.Martin@arm.com> <1507660725-7986-17-git-send-email-Dave.Martin@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36194 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbdJKQzN (ORCPT ); Wed, 11 Oct 2017 12:55:13 -0400 Content-Disposition: inline In-Reply-To: <1507660725-7986-17-git-send-email-Dave.Martin@arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Martin Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Okamoto Takayuki , libc-alpha@sourceware.org, Ard Biesheuvel , Szabolcs Nagy , Suzuki K Poulose , Will Deacon , Richard Sandiford , Alex =?iso-8859-1?Q?Benn=E9e?= , kvmarm@lists.cs.columbia.edu On Tue, Oct 10, 2017 at 07:38:33PM +0100, Dave P Martin wrote: > This patch uses the cpufeatures framework to determine common SVE > capabilities and vector lengths, and configures the runtime SVE > support code appropriately. > > ZCR_ELx is not really a feature register, but it is convenient to > use it as a template for recording the maximum vector length > supported by a CPU, using the LEN field. This field is similar to > a feature field in that it is a contiguous bitfield for which we > want to determine the minimum system-wide value. This patch adds > ZCR as a pseudo-register in cpuinfo/cpufeatures, with appropriate > custom code to populate it. Finding the minimum supported value of > the LEN field is left to the cpufeatures framework in the usual > way. > > The meaning of ID_AA64ZFR0_EL1 is not architecturally defined yet, > so for now we just require it to be zero. > > Note that much of this code is dormant and SVE still won't be used > yet, since system_supports_sve() remains hardwired to false. > > Signed-off-by: Dave Martin > Cc: Alex Bennée > Cc: Suzuki K Poulose Reviewed-by: Catalin Marinas