Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2387999rwd; Sun, 21 May 2023 20:13:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WLV7L+8cuN2QDQChne3M7kpKXqRae0B6yTntQ5utpjw0yuUvUiVGnZStx4A7++l8Z5O5M X-Received: by 2002:a05:6a00:1a46:b0:64d:1451:8224 with SMTP id h6-20020a056a001a4600b0064d14518224mr11845603pfv.22.1684725189174; Sun, 21 May 2023 20:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684725189; cv=none; d=google.com; s=arc-20160816; b=trb5+URcXQh2qD/I7uaIIaef57cewSRaMrB1Pqa3vshd4lxCx/p9fdkzFk6zgCDwRI +zsnc4NnnMRZ85w+xMm5isqYcjMvI1uvo/VmBNIMfOCG+6RT81cxPzjTDGztX+ex81SK g3GMIPwqOIbPzEMOVbolnKh6miUrwnH9kAwRnTWzsgjpnTuWBO9yXNtEIPc8hUtnzaO3 tgGGPT7AsOGOC7PHrsyyDHfuHsZmrK3RHHgxFku3mogBgksli5h+gJA78mD9/oORcnYI TBO7r+6LrlS+J5dM7CMWPpy4ikthBqicfF5iCcOtxxpATvxQohN0PBLhbc9sImEJs+/+ CiUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fWDVQ2z9KbD5MMR01fZ/nUn7dd6pMxIl5hvJiDhQHvo=; b=I+JGOdSVicZ6Ne8EvJe5cjzk3qQ2alEChRkK9JKamKgJZXMnBtVOksZgrgkV6p6M2E fusS+fc+qfTKVmdF+SBkNaKSFIJr/cXfPZr73InsqvesHcUeuPndy5W4DkgnE/KqEKI9 4A5nsv63geSLTBdLSOs0Hie7PkLYhgn5fRYx2LxiW0bDNXhUoXOQIFlSWOAmKJKWNz5b IhBspg73arZIiI2+sdNhHyR/t4cX0SrRh6erLanUoJaJV1a0RMjY4HTYJTU+StoTiyUI uyFClkikJzpFJAwF/xPRWzaJrphpSBkPdIlNDpsQjnjOiLZRj3LnHkkmWYFWG+WhJEWD xBpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=UaHBoDKS; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h17-20020a056a00001100b0064dd2d0017asi208790pfk.38.2023.05.21.20.12.56; Sun, 21 May 2023 20:13:09 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=UaHBoDKS; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229989AbjEVCoj (ORCPT + 99 others); Sun, 21 May 2023 22:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbjEVCoi (ORCPT ); Sun, 21 May 2023 22:44:38 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83C0CCD for ; Sun, 21 May 2023 19:44:37 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2554696544cso798236a91.2 for ; Sun, 21 May 2023 19:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684723477; x=1687315477; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fWDVQ2z9KbD5MMR01fZ/nUn7dd6pMxIl5hvJiDhQHvo=; b=UaHBoDKS854frBK/ZKm/R5ak1GHqwLRbN0J3coRoqw85jDzTznan3Fh68I9q/yJBSW aq3sxoWgOF2YZcpy+SO29NYWNygI9aypJTjTDDuGIHXYy4Hmo6n0saTKnvLpgafSE+ti OFt6MoYdT+7QtRBcSKSL8crqbuTBkBxkcFmgj3OVi4G0STdrKDwEs2WMkxtJySmH2/RH PNsSHbRO6SQNegR7LYf2TbmKVPniZkq2Tki8kTRTlJ1qNvqoKMMLn69EiuQXlw8v85cu AySeapHgW/ZzU/NHYy8hDzQpXQJNmJ2l1W3LryPqDUZWKV4nEZTKFjqtU1MiBgjfAD/h ie1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684723477; x=1687315477; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fWDVQ2z9KbD5MMR01fZ/nUn7dd6pMxIl5hvJiDhQHvo=; b=hUWCA51zFvIY3Fm4VHmflbCexCwldBD+Nj/Ni+ERb7M53CPPqnTmIPbWx3J1p+Fcyp wmIXsxJwuRCERrctQiptfOQYBIt7+H5jcCvFET33+s0eNBQm5foiSqYN36fIJNoBArFh Qs1/WW0ZwZsIfu2GiNQe6eGp0qyzLcWLKjLHnxqDRju1LTND99LrLxb3h7KeeaU3j4vv 8XqTp81GdrYHLinlIcSgMIYBBQPeFhQL2kEP0rsvgXOUlTzlCHIUlJYQG/yh51RddUro orzdJgChO/oSGJpOvokesqd6uhSU2Z8SmVCrtzBfL6/YZdrQg6EqO/v7U0HGH0hNoLui yVjg== X-Gm-Message-State: AC+VfDxYz4Rs3On3AnQNoC0ibEEl7PSSANaX0yBFtz7xJ1cVH2wbvFNc 17A5LS+mfXaD+Ea/I2OtP1ZOLRGyZvRp++07E/E= X-Received: by 2002:a17:902:daca:b0:1ac:859a:5b5a with SMTP id q10-20020a170902daca00b001ac859a5b5amr13057446plx.0.1684723476850; Sun, 21 May 2023 19:44:36 -0700 (PDT) MIME-Version: 1.0 References: <20230519102908.253458-1-suagrfillet@gmail.com> <9a274a44b61345e8aba747a44250c4d8@EXMBX066.cuchost.com> <20230519-clarinet-collar-ba2c0fa37e11@wendy> <20230519-roundup-legwarmer-e26b31db3123@spud> In-Reply-To: <20230519-roundup-legwarmer-e26b31db3123@spud> From: Song Shuai Date: Mon, 22 May 2023 02:44:24 +0000 Message-ID: Subject: Re: [PATCH] riscv: hibernation: Remove duplicate call of suspend_restore_csrs To: Conor Dooley Cc: Conor Dooley , JeeHeng Sia , "paul.walmsley@sifive.com" , "palmer@dabbelt.com" , "aou@eecs.berkeley.edu" , Mason Huo , Leyfoon Tan , "ajones@ventanamicro.com" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Song Shuai Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Conor Dooley =E4=BA=8E2023=E5=B9=B45=E6=9C=8819=E6=97=A5= =E5=91=A8=E4=BA=94 20:07=E5=86=99=E9=81=93=EF=BC=9A > > On Fri, May 19, 2023 at 12:28:07PM +0100, Conor Dooley wrote: > > Hey, > > > > On Fri, May 19, 2023 at 11:14:27AM +0000, JeeHeng Sia wrote: > > > > > > The suspend_restore_csrs is called in both __hibernate_cpu_resume > > > > and the `else` of subsequent swsusp_arch_suspend. > > > > > > > > Removing the first call makes both suspend_{save,restore}_csrs > > > > left in swsusp_arch_suspend for clean code. > > It took me embarrassingly long to wrap my head around the control flow > here again. I'm not sure that I agree with you that splitting the calls > between asm & c is cleaner, but whatever: > Reviewed-by: Conor Dooley > > > > > > > > > Signed-off-by: Song Shuai > > > > Signed-off-by: Song Shuai > > > > BTW, why the two email addresses? The tinylab one here seems entirely > > redundant - unless it is your employer, in which case should it be the > > only SoB address & also in the author field? > > Deja vu with my questioning your email address, but does your > tinylab address actually repeat "shuai"? > Yes, that's my full name. As you noticed, I'm switching my email from Gmail to Tinylab but did something wrong. Thanks for your correction, I'll re-send this patch with your suggestions applied. > > Also, Fixes tag? > > > > > > --- > > > > arch/riscv/kernel/hibernate-asm.S | 1 - > > > > 1 file changed, 1 deletion(-) > > > > > > > > diff --git a/arch/riscv/kernel/hibernate-asm.S b/arch/riscv/kernel/= hibernate-asm.S > > > > index 5c76671c7e15..d698dd7df637 100644 > > > > --- a/arch/riscv/kernel/hibernate-asm.S > > > > +++ b/arch/riscv/kernel/hibernate-asm.S > > > > @@ -28,7 +28,6 @@ ENTRY(__hibernate_cpu_resume) > > > > > > > > REG_L a0, hibernate_cpu_context > > > > > > > > - suspend_restore_csrs > > > > suspend_restore_regs > > > > > Good catch. This function is invoked twice to restore the CSRs. > > > I am good with removing this function from here. > > > > If that's a review, then please either give an R-b or A-b tag :) > > > > Thanks, > > Conor. > > --=20 Thanks, Song