Message ID | 20230317124915.1263-4-sundongxu3@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp326795wrt; Fri, 17 Mar 2023 06:04:59 -0700 (PDT) X-Google-Smtp-Source: AK7set+TuT2I2ph0xh5Vuvl6Oh/b1zIZW+b2++uxFJZrlmkijBx7EebMtpWEX5SlhrD0IA1OvvfS X-Received: by 2002:a05:6a00:1489:b0:623:94a2:1a69 with SMTP id v9-20020a056a00148900b0062394a21a69mr11243408pfu.2.1679058298973; Fri, 17 Mar 2023 06:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679058298; cv=none; d=google.com; s=arc-20160816; b=nW+mjTXSoqFpo9UnlUjhDcVIcoEVoJDsKhOBntF7FPe7VD2Jo34yL5wY9tVw1ITJ4F IZh2vDU6Gs/R45JBhCcUyWADWdpcRrXN4Z6g9N3vQrnqzJIUmUX7ghUA84irlbZIBZvC fkzq9bUa/lnK0YMfn+Go9mXA8KOv/6e0ag2JdpV+XkTf8sAB47XgfQ+OHJbpNBZjBBRr ufm2PLN8wMMAtcpz6tvcfmmrrpDZtaoeY+sXUNRfrx3IR0BXnyP+ri+tap7a0utGVD/Z o91+JoXvu4RpFnMhqZ/V7t5p72K/r1csHwISR7zE2Zqa/3I4ob7uHesWV7Qyj/ifwpjA q7+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7gyslDM+Tnsl672ctp+KllVXehaP8OZ9k/d1bCqpmF0=; b=yA5YpWkfbW/AGzv+cSmlVqZd1SlPLjk7XAs30J+Vcwqmlimg0MRsqnzCjG0yTDOf2i EvcMwS7iXDwh5j9Q2bthcYA/oQQI843cXuvXQhoG5od9sa+WBjAGlJfYa7myLgXsnX2r ZLINavBox8sw71ct2O3bBpl9YDTKAzQ/FwWhtxNr99tBM/g7oQP9NxblbQXndDZtCety 7LSp+uQqrD49pNaq+1J+F0mGjnTKRDe55jHZjf0D3MpeKYrWUhUbHrcXQa6vSbTcKBY7 BQEz5Q2Xycug42L7QXMFF1dk0mksCf94tAVxBoiktBR89es4Tn0B/Nw3VlpWf8VU6Gqg CZOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i186-20020a626dc3000000b00623114a7324si2187271pfc.363.2023.03.17.06.04.44; Fri, 17 Mar 2023 06:04:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbjCQMt5 (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 17 Mar 2023 08:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbjCQMtw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Mar 2023 08:49:52 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F1915CC14 for <linux-kernel@vger.kernel.org>; Fri, 17 Mar 2023 05:49:48 -0700 (PDT) Received: from dggpeml500004.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PdP5d54JhznXq1; Fri, 17 Mar 2023 20:46:45 +0800 (CST) Received: from DESKTOP-EJM108K.china.huawei.com (10.174.186.25) by dggpeml500004.china.huawei.com (7.185.36.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 17 Mar 2023 20:49:46 +0800 From: Dongxu Sun <sundongxu3@huawei.com> To: <catalin.marinas@arm.com>, <will@kernel.org>, <broonie@kernel.org> CC: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <wanghaibin.wang@huawei.com>, Dongxu Sun <sundongxu3@huawei.com> Subject: [PATCH 3/4] arm64/signal: Add tpidr2/za/zt sigframe size in comment Date: Fri, 17 Mar 2023 20:49:14 +0800 Message-ID: <20230317124915.1263-4-sundongxu3@huawei.com> X-Mailer: git-send-email 2.33.0.windows.2 In-Reply-To: <20230317124915.1263-1-sundongxu3@huawei.com> References: <20230317124915.1263-1-sundongxu3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.186.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500004.china.huawei.com (7.185.36.140) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760620235023919084?= X-GMAIL-MSGID: =?utf-8?q?1760620235023919084?= |
Series |
arm64: Use specific checking for TPIDR2 and some comments update
|
|
Commit Message
sundongxu (A)
March 17, 2023, 12:49 p.m. UTC
Update the comments of sigcontext.__reserved[], since we already
support SME/SME2.
Signed-off-by: Dongxu Sun <sundongxu3@huawei.com>
---
arch/arm64/include/uapi/asm/sigcontext.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
On Fri, Mar 17, 2023 at 08:49:14PM +0800, Dongxu Sun wrote: > * 0x8a0 sve_context (vl <= 64) (optional) > + * 0x10 tpidr2_context (optional) > + * 0x10 za_context (optional) The size of the ZA context is variable, going with what the SVE has a VL which might fit into the base context should be included but that's complicated what with it likely appearing after another variably sized frame. > + * 0x10 zt_context (optional) The ZT context is never this small, it's always got register contents if present. > * 0x20 extra_context (optional) > * 0x10 terminator (null _aarch64_ctx) > * > - * 0x510 (reserved for future allocation) > + * 0x4e0 (reserved for future allocation) TBH I'm not sure this comment is actually useful or helpful, it's already not fully taking into account the variablility of the SVE frame size (quoting a fixed value) and with the way we allocate things once we've gone into the extra_context we'll allocate new frames from there so even smaller frames like the tpidr2_context will go there. I'm not sure trying to suggest a layout/ordering is clarifying anything for anyone.
On 2023/3/17 21:03, Mark Brown wrote: > On Fri, Mar 17, 2023 at 08:49:14PM +0800, Dongxu Sun wrote: > >> * 0x8a0 sve_context (vl <= 64) (optional) >> + * 0x10 tpidr2_context (optional) >> + * 0x10 za_context (optional) > > The size of the ZA context is variable, going with what the SVE has a VL > which might fit into the base context should be included but that's > complicated what with it likely appearing after another variably sized > frame. > >> + * 0x10 zt_context (optional) > > The ZT context is never this small, it's always got register contents if > present. The context size of ZA and ZT here is wrong due to oversight. The ZA context size is related to the SVL, and the ZT context size may also get changed with further extensions. > >> * 0x20 extra_context (optional) >> * 0x10 terminator (null _aarch64_ctx) >> * >> - * 0x510 (reserved for future allocation) >> + * 0x4e0 (reserved for future allocation) > > TBH I'm not sure this comment is actually useful or helpful, it's > already not fully taking into account the variablility of the SVE frame > size (quoting a fixed value) and with the way we allocate things once > we've gone into the extra_context we'll allocate new frames from there > so even smaller frames like the tpidr2_context will go there. I'm not > sure trying to suggest a layout/ordering is clarifying anything for > anyone. Thanks for your point, considering the scalability of SME/SME2, maybe there is no need to add layout suggestion. So, let's discard this commit:) Thanks, Dongxu
diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h index 656a10ea6c67..d85e3079474d 100644 --- a/arch/arm64/include/uapi/asm/sigcontext.h +++ b/arch/arm64/include/uapi/asm/sigcontext.h @@ -45,10 +45,13 @@ struct sigcontext { * 0x210 fpsimd_context * 0x10 esr_context * 0x8a0 sve_context (vl <= 64) (optional) + * 0x10 tpidr2_context (optional) + * 0x10 za_context (optional) + * 0x10 zt_context (optional) * 0x20 extra_context (optional) * 0x10 terminator (null _aarch64_ctx) * - * 0x510 (reserved for future allocation) + * 0x4e0 (reserved for future allocation) * * New records that can exceed this space need to be opt-in for userspace, so * that an expanded signal frame is not generated unexpectedly. The mechanism