[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50d3d9d3-50f2-4c95-a481-6e744ae17099@sirena.org.uk>
Date: Wed, 5 Jun 2024 13:56:19 +0100
From: Mark Brown <broonie@...nel.org>
To: Fuad Tabba <tabba@...gle.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kvmarm@...ts.linux.dev
Subject: Re: [PATCH 2/4] arm64/fpsimd: Discover maximum vector length
implemented by any CPU
On Wed, Jun 05, 2024 at 01:03:16PM +0100, Fuad Tabba wrote:
> Actually, I was working on fixing it and was about to send this, which
> I think might be a bit simpler than what you have. Let me know what
> you think and I'll send it as a proper patch if you agree:
> +
> + if (!max_vl)
> + max_vl = vl;
> }
> +
> + info->max_system_vl = max((int) max_vl, info->max_system_vl);
Yeah, I originally had written something like this (just doing the max
in the original assignment rather than staging in a local variable) but
it didn't feel great and like it was more vulnerable to getting missed
if we do more parallel bringup so I switched to keeping the split
between enumeration and integration.
I do also prefer the _cpu_ naming since _system_ could be read as the
maximum that we're actually using in the system, as with any naming
thing it's all a bit bikesheddy.
> if (system_supports_sve()) {
> kvm_sve_max_vl = sve_max_virtualisable_vl();
> - kvm_host_sve_max_vl = sve_max_vl();
> + kvm_host_sve_max_vl = vl_info[ARM64_VEC_SVE].max_system_vl;
We should keep the accessor functions, it's more consistent and supports
refactoring.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists