From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D36F6C433EF for ; Mon, 21 Feb 2022 19:04:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229523AbiBUTFD (ORCPT ); Mon, 21 Feb 2022 14:05:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiBUTFC (ORCPT ); Mon, 21 Feb 2022 14:05:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A81AB13D0A for ; Mon, 21 Feb 2022 11:04:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 43CDE60A27 for ; Mon, 21 Feb 2022 19:04:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3CF7C340E9; Mon, 21 Feb 2022 19:04:34 +0000 (UTC) Date: Mon, 21 Feb 2022 19:04:31 +0000 From: Catalin Marinas To: Szabolcs Nagy Cc: Mark Brown , Will Deacon , Marc Zyngier , Shuah Khan , Shuah Khan , Alan Hayward , Luis Machado , Salil Akerkar , Basant Kumar Dwivedi , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH v11 10/40] arm64/sme: Basic enumeration support Message-ID: References: <20220207152109.197566-1-broonie@kernel.org> <20220207152109.197566-11-broonie@kernel.org> <20220221160706.GK2692478@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220221160706.GK2692478@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Mon, Feb 21, 2022 at 04:07:06PM +0000, Szabolcs Nagy wrote: > The 02/21/2022 14:32, Catalin Marinas wrote: > > On Mon, Feb 07, 2022 at 03:20:39PM +0000, Mark Brown wrote: > > > diff --git a/Documentation/arm64/elf_hwcaps.rst b/Documentation/arm64/elf_hwcaps.rst > > > index b72ff17d600a..5626cf208000 100644 > > > --- a/Documentation/arm64/elf_hwcaps.rst > > > +++ b/Documentation/arm64/elf_hwcaps.rst > > > @@ -259,6 +259,39 @@ HWCAP2_RPRES > > > > > > Functionality implied by ID_AA64ISAR2_EL1.RPRES == 0b0001. > > > > > > +HWCAP2_SME > > > + > > > + Functionality implied by ID_AA64PFR1_EL1.SME == 0b0001, as described > > > + by Documentation/arm64/sme.rst. > > > + > > > +HWCAP2_SME_I16I64 > > > + > > > + Functionality implied by ID_AA64SMFR0_EL1.I16I64 == 0b1111. > > > + > > > +HWCAP2_SME_F64F64 > > > + > > > + Functionality implied by ID_AA64SMFR0_EL1.F64F64 == 0b1. > > > + > > > +HWCAP2_SME_I8I32 > > > + > > > + Functionality implied by ID_AA64SMFR0_EL1.I8I32 == 0b1111. > > > + > > > +HWCAP2_SME_F16F32 > > > + > > > + Functionality implied by ID_AA64SMFR0_EL1.F16F32 == 0b1. > > > + > > > +HWCAP2_SME_B16F32 > > > + > > > + Functionality implied by ID_AA64SMFR0_EL1.B16F32 == 0b1. > > > + > > > +HWCAP2_SME_F32F32 > > > + > > > + Functionality implied by ID_AA64SMFR0_EL1.F32F32 == 0b1. > > > + > > > +HWCAP2_SME_FA64 > > > + > > > + Functionality implied by ID_AA64SMFR0_EL1.FA64 == 0b1. > > > > More of a question for the libc people: should we drop the fine-grained > > HWCAP corresponding to the new ID_AA64SMFR0_EL1 register (only keep > > HWCAP2_SME) and get the user space to use the MRS emulation? Would any > > ifunc resolver be affected? > > good question. > > within glibc HWCAP2_SME is enough (to decide if we need to > deal with additional register state and the lazy ZA save > scheme) but i guess user code that actually uses sme would > need the details (including in ifunc resolvers in principle). > > since we have mrs, there is no strict need for hwcaps. > if ifunc resolvers using this info are not widespread then > the mrs emulation overhead is acceptable, but i suspect > hwcaps are nicer to use. I presume the ifunc resolvers only run once, so the overhead won't be noticed. Anyway, happy to keep the new HWCAP2 if they are useful. > do we have a plan after hwcap2 bits run out? :) HWCAP3 or we free up the top 32-bit in both HWCAP and HWCAP2 ranges. We did not extend into those upper bits because of the ILP32 discussions at the time. -- Catalin