From patchwork Wed Sep 21 21:43:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Stillson X-Patchwork-Id: 1680842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Yvc9i271; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20210112.gappssmtp.com header.i=@rivosinc-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=AODJ1Met; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MXsQm1qx1z1ypf for ; Thu, 22 Sep 2022 07:45:20 +1000 (AEST) 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=AYOL8q0swQ8hxbGx1LMnKg9gG0KpQb69iN9B5P40BgA=; b=Yvc9i271gyg257 WuvMVcdr7v2/uUu/afQspdiJaloUUQMLipqV1LNH3S/1JPHsI6BJQXLG1BFjtnknvUn317cpCDJj3 0N2/pTKD+ZbCfGL/Iu/BkvsIxisCaT4uo84VNplPOg10UTeyqlkerJOo/iU5WNxEgFyZzlkO9daxD HxZL+Lx/tsR26x3qv1AjfMHxpmgPrGWv7Kb1BMNw1UHcUGTixKhAWAcscmDxXRyx3BA4+4GssfsYg dXTZ7oaxhqmBLEiGwLVf6JyYbvgVdueRkDqP9eysnxOlFtgz6ZxQihq8CUcmS4zJvLtufOah7ZB+P XNbcIqfaknclfug6K0Qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ob7Wt-00CkO1-IS; Wed, 21 Sep 2022 21:45:15 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ob7Wq-00CkMT-3g for kvm-riscv@lists.infradead.org; Wed, 21 Sep 2022 21:45:13 +0000 Received: by mail-pj1-x1032.google.com with SMTP id fs14so7828178pjb.5 for ; Wed, 21 Sep 2022 14:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=pNiBU06AGrcp2W7TASu6fynoklavjSC6OPveK31UOzA=; b=AODJ1Met9EqOFJ4cncAvFVOLy/vjD28tPZRu9cI+tOqlRM3XwC4eEObWXuwfBkBDN9 mOxBzSvjST4aYkBWFRHz1i1TJdk+/i5lB5ynpkAt6eAlo+QxDJrBkrn0Nz9SAtAVDY1g INj4t/p1sDMlNYYXorqVirr7LRBXBgWuUwvt84cU+QVW9pprJuTsmbWkhd9pB/4afNoF fKHaWzrCX4Q+5bdJiBCMYtqwKZfI1kNxNfYAeaCtFoSNcog9h4iY5lkEtpEu8/gIQtT+ B29rZ0Im5wgfComzCEXUmaqTAJ0b2hW9OHNlgL53UFClryljl0yxXK494k68dC0RE4nK lZ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=pNiBU06AGrcp2W7TASu6fynoklavjSC6OPveK31UOzA=; b=OEsr2LN3FbTGYev5i+Z9HQ5q5pW0R5uQazhIp9xr6tA6v5+9vQBgW3bi1zC5iJNAl+ R3owvIYQFkeqAo4A9lJrOasWuoCKc1kBDYStTwQrY03pfcyxw9oLWrCC892em2/Srd3p 0CSdo/XnvE4PIFesMPoMqO+uuQpPBlVt7dlfN1y2PVwD2Gxcrxl4WiaU0nUoMv2cQ+PN ekP1KvrSHS7Xr+9JNzrRr/+ylQKUp6fQ0Gv5f30vv3X4sXlt0n8oDb6dYxLU0QCVt+OL CXFHfWyjrAxZa5Qdo+efNqorG7XAtTautZ4SZOHIba32ZTGhpdwtVbESwnxxSAhICFp/ gyHA== X-Gm-Message-State: ACrzQf3VtdcEojSlMhMVc+mpQWql0TYkfekS0TN6LKM6IfBybk4REI3Q +UE4xZ6z2cs+s7wRSozhmjY9pA== X-Google-Smtp-Source: AMsMyM66myoGyBDoxPP1OWRrxSd6epYp/I3FF3zSvwBuBEey8VV+8fee78OywI4HTAiLpldibOjvXA== X-Received: by 2002:a17:902:e547:b0:178:7cf4:90e9 with SMTP id n7-20020a170902e54700b001787cf490e9mr232284plf.158.1663796709143; Wed, 21 Sep 2022 14:45:09 -0700 (PDT) Received: from stillson.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id k7-20020aa79727000000b005484d133127sm2634536pfg.129.2022.09.21.14.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 14:45:08 -0700 (PDT) From: Chris Stillson To: Cc: Guo Ren , Guo Ren , Greentime Hu , Anup Patel , Palmer Dabbelt , Paul Walmsley , Palmer Dabbelt , Albert Ou , Eric Biederman , Kees Cook , Atish Patra , Oleg Nesterov , Guo Ren , Heinrich Schuchardt , Conor Dooley , Arnaud Pouliquen , Chris Stillson , Paolo Bonzini , Alexandre Ghiti , Arnd Bergmann , Vincent Chen , Heiko Stuebner , Dao Lu , Jisheng Zhang , Sunil V L , Nick Knight , Han-Kuan Chen , Changbin Du , Li Zhengyu , Alexander Graf , Ard Biesheuvel , Tsukasa OI , Yury Norov , Nicolas Saenz Julienne , "Paul E. McKenney" , Frederic Weisbecker , Mark Rutland , Vitaly Wool , Myrtle Shah , Ruinland Tsai , Catalin Marinas , Mark Brown , Will Deacon , Alexey Dobriyan , Huacai Chen , Janosch Frank , Christian Brauner , Eugene Syromiatnikov , Peter Collingbourne , Colin Cross , Andrew Morton , Suren Baghdasaryan , Barret Rhoden , Davidlohr Bueso , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org Subject: [PATCH v12 01/17] riscv: Rename __switch_to_aux -> fpu Date: Wed, 21 Sep 2022 14:43:43 -0700 Message-Id: <20220921214439.1491510-1-stillson@rivosinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220921_144512_159017_0C2B819D X-CRM114-Status: GOOD ( 13.31 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Guo Ren The name of __switch_to_aux is not clear and rename it with the determine function: __switch_to_fpu. Next we could add other regs' switch. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Signed-off-by: Greentime Hu Reviewed-by: Anup Patel Reviewe [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1032 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Guo Ren The name of __switch_to_aux is not clear and rename it with the determine function: __switch_to_fpu. Next we could add other regs' switch. Signed-off-by: Guo Ren Signed-off-by: Guo Ren Signed-off-by: Greentime Hu Reviewed-by: Anup Patel Reviewed-by: Palmer Dabbelt Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner --- arch/riscv/include/asm/switch_to.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h index 11463489fec6..df1aa589b7fd 100644 --- a/arch/riscv/include/asm/switch_to.h +++ b/arch/riscv/include/asm/switch_to.h @@ -46,7 +46,7 @@ static inline void fstate_restore(struct task_struct *task, } } -static inline void __switch_to_aux(struct task_struct *prev, +static inline void __switch_to_fpu(struct task_struct *prev, struct task_struct *next) { struct pt_regs *regs; @@ -65,7 +65,7 @@ static __always_inline bool has_fpu(void) static __always_inline bool has_fpu(void) { return false; } #define fstate_save(task, regs) do { } while (0) #define fstate_restore(task, regs) do { } while (0) -#define __switch_to_aux(__prev, __next) do { } while (0) +#define __switch_to_fpu(__prev, __next) do { } while (0) #endif extern struct task_struct *__switch_to(struct task_struct *, @@ -76,7 +76,7 @@ do { \ struct task_struct *__prev = (prev); \ struct task_struct *__next = (next); \ if (has_fpu()) \ - __switch_to_aux(__prev, __next); \ + __switch_to_fpu(__prev, __next); \ ((last) = __switch_to(__prev, __next)); \ } while (0)