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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D28BC433F5 for ; Tue, 7 Dec 2021 16:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pxFq4In1kEQUAXqXxIC2eXiDD6+J24ZvMi077mU3d20=; b=JNXl14NxmFW9Nz IOe96Gy30SYVo/Xxc1VtzSauw3OnVI7VST3HPAa/rckTrAg2WX8gIMPEyVMrkjvu2UmPeg14yAbYL E0OEfCvKKPROZOjGyi+QjPh6GxmsTbInRbAGt8xRXD3X0SrmjmOsUC/XQgvRoheF1YwXR0akMTOIP oqlNWAGygHOpiiIOYOzQ+kIUb6neH4pXAiSYxcCKEPK3Ud79KCsG8B91OZY9xPOXL/ivoEHdjTO5u sZc7SGhnnZzZTLeSMB/KT4zLHzCoHoHwzNHRxWiJsj3/4bAzgDQHvvm5bCFkBBCvvAEedayD+LaRY Hq67xV87Fy4OdqC7tXXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mudOp-009SJz-9N; Tue, 07 Dec 2021 16:33:03 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mudOl-009SJ6-9E for linux-arm-kernel@lists.infradead.org; Tue, 07 Dec 2021 16:33:00 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id E0360B816FB; Tue, 7 Dec 2021 16:32:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1CFCC341C1; Tue, 7 Dec 2021 16:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638894775; bh=Y5/DDA55DoB1uxQIzh77apfdxA3rzkdJE54/oPs3Fsw=; h=From:To:Cc:Subject:Date:From; b=hdspwxmqM16LQ7uTCHpQQVhw5GyLo9UuaAsT5+x1hBhDilSVHPzB2alylh5VKGuui Sloh9QXXFZzwYBv0t1hdNXKUlqjRhcFj5WiapzwPvLbeHkwWcb8ScKIC3uwnonFZ6x wZkl5VvdZe22nIk1RCwPodQT8B/DRqBY7bokSionSg+YTKpYIQ3bdnVk8NM2o8zUL6 y0CIhWG5NfVVCHwm+5HhICJBvimTBIkQKj+PkSHhqQZk4Jcm6pJYhYCYPlaUQKWlHA i64MXHevC6s0LjKpTMJiQpsXDafv2ZcTmlns13W3Af3P/zFks9F93MuDwaS88TSwQZ vw53UB95cciRA== From: Mark Brown To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH] arm64/fp: Add comments documenting the usage of state restore functions Date: Tue, 7 Dec 2021 16:32:50 +0000 Message-Id: <20211207163250.1373542-1-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1481; h=from:subject; bh=Y5/DDA55DoB1uxQIzh77apfdxA3rzkdJE54/oPs3Fsw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhr4xUzqsy0p6Xqc32TI7xz/zBAwOdUz25Keb4gAzT eu7tZHWJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYa+MVAAKCRAk1otyXVSH0Ps8B/ wI9tgagQm2Qe0oodXs8gbi9MMaHzss6QPiwRUFIhPrzw++8QJqRin9HJ5hyKKs2Wp27ifaJH4SjJh7 G15nrmbIxgjimDDnhlKKw22rlmoWLu64g3FTz36bKYp5CaF2F/6w2VYKJHFSAQWN0H4XI7VnVYh4C9 VkOxH3ILUrC6Yr6i0OqPDP6uSMMEV1jvLgrLvlFuvadavQb3cpz6p99QPyQ2roLq8MbhIzsif6QuNk L5ZyA9Tbzsw3CUojYUKaFU04MI/ELrGaTPCGjXY1XbLfPjkn9UDdITLYTzGOYkU8h7g2x1B1StjE7M q73vn4xyN/i3sEa6lYn24+rBAqOL+E X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_083259_507612_B02EB2EE X-CRM114-Status: GOOD ( 14.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add comments to help people figure out when fpsimd_bind_state_to_cpu() and fpsimd_update_current_state() are used. Signed-off-by: Mark Brown --- arch/arm64/kernel/fpsimd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 6fb361e8bed8..d3573f19e831 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -1217,7 +1217,8 @@ void fpsimd_bind_state_to_cpu(struct user_fpsimd_state *st, void *sve_state, /* * Load the userland FPSIMD state of 'current' from memory, but only if the * FPSIMD state already held in the registers is /not/ the most recent FPSIMD - * state of 'current' + * state of 'current'. This is called when we are preparing to return to + * userspace to ensure that userspace sees a good register state. */ void fpsimd_restore_current_state(void) { @@ -1248,7 +1249,9 @@ void fpsimd_restore_current_state(void) /* * Load an updated userland FPSIMD state for 'current' from memory and set the * flag that indicates that the FPSIMD register contents are the most recent - * FPSIMD state of 'current' + * FPSIMD state of 'current'. This is used by the signal code to restore the + * register state when returning from a signal handler in FPSIMD only cases, + * any SVE context will be discarded. */ void fpsimd_update_current_state(struct user_fpsimd_state const *state) { -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel