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 23341C77B73 for ; Mon, 22 May 2023 01:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbjEVBLQ convert rfc822-to-8bit (ORCPT ); Sun, 21 May 2023 21:11:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbjEVBLO (ORCPT ); Sun, 21 May 2023 21:11:14 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ECE8CD for ; Sun, 21 May 2023 18:11:12 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 163AF24DDB2; Mon, 22 May 2023 09:11:10 +0800 (CST) Received: from EXMBX167.cuchost.com (172.16.6.77) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 22 May 2023 09:11:10 +0800 Received: from EXMBX066.cuchost.com (172.16.7.66) by EXMBX167.cuchost.com (172.16.6.77) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 22 May 2023 09:11:09 +0800 Received: from EXMBX066.cuchost.com ([fe80::5947:9245:907e:339f]) by EXMBX066.cuchost.com ([fe80::5947:9245:907e:339f%17]) with mapi id 15.00.1497.044; Mon, 22 May 2023 09:11:09 +0800 From: JeeHeng Sia To: Conor Dooley , Conor Dooley CC: Song Shuai , "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 Subject: RE: [PATCH] riscv: hibernation: Remove duplicate call of suspend_restore_csrs Thread-Topic: [PATCH] riscv: hibernation: Remove duplicate call of suspend_restore_csrs Thread-Index: AQHZij0JnSRR82RN7UivChxgOm4HvK9hcVtQ//9+BoCAAJELgIAD/mKg Date: Mon, 22 May 2023 01:11:09 +0000 Message-ID: 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> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [202.188.176.82] x-yovoleruleagent: yovoleflag Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Conor Dooley > Sent: Saturday, May 20, 2023 4:07 AM > To: Conor Dooley > Cc: JeeHeng Sia ; Song Shuai ; 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 > Subject: Re: [PATCH] riscv: hibernation: Remove duplicate call of suspend_restore_csrs > > 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"? > > > 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 :) Reviewed-by: JeeHeng Sia > > > > Thanks, > > Conor. >