Message ID | 20230519060854.214138-1-suagrfillet@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1022570vqo; Thu, 18 May 2023 23:26:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Uzuwn6IT4asyELzLbvutlpTbh/KP8hrquE2JxO4VaHS8siFMQenjH8jXArzXyw7Opaeno X-Received: by 2002:a05:6a20:9f4a:b0:100:6f8f:7793 with SMTP id ml10-20020a056a209f4a00b001006f8f7793mr1132082pzb.3.1684477572843; Thu, 18 May 2023 23:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684477572; cv=none; d=google.com; s=arc-20160816; b=Fgy+Pz976N8KYnLO96OeZpc8/LRhi95IGBR6jVK2Ydb7w0kbZmFfh9kZqSf1WVftD2 aHsJi5Z9SE0ZgmDCWYIYCpXhHMERUB8nY+162Oas2MVPXRWT5+yGaPBwkwmHJ704eZ73 Ypk8Jdm9VHlVCdhQq7gp4KQYGYrZHcvBqLa2KV6cVgxnD2bx6GPKbqIiVqUoW4vk9OL2 dMuZKCz5fb7OuSi0l9xWB4O85ZMcPWN8nbtdB1jGLXQ4Cb65K4sPCo9MBjUAqzu4DXPz iQy30ZcXHyYTjv/oQTuk+Y3S1Mm18KmhZ6fEHiQh4IxyeSQV1lf8W1yGVTKA6glL9vEU LIbw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=acsQIdfOS76XIGk2swzVCmK3bhSNOQiVKEd2nYdPHpU=; b=t/6zR8aKIZra0sDsFdkvi/lG8N8S+YPpr8bx65O0NiAnEnOUUbt1SEmNV7VNf/Nsw1 UPZzCqpRrPJlCjTqh5740ry7grty7RSUvsjPi5OSnqXCvzO2TE/+n+hr7nu8INE4MgyU 8qvUgJveCf5DlcxfefegHC3QZOInoPjnxANp5P7WwnALBT2FIeZWDNn5TkJdlMGRiXBS oQCs9CmG+8wwU/gCpfx2EDK8WSsMXcr4uDfxqWGXK5GXmuCHa1uEJbn+ZMuiVEE9cZ/4 IbZGXJ/EnJgjVoACirqLypSsjBzE/7HDXhZdO+lDDHjSFgXB1JHq79afeFVJtnrUFhM/ Eybg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Z2qCGyti; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j191-20020a6380c8000000b00534748f9cd8si2915065pgd.644.2023.05.18.23.26.00; Thu, 18 May 2023 23:26:12 -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=Z2qCGyti; 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 S229779AbjESGJF (ORCPT <rfc822;cscallsign@gmail.com> + 99 others); Fri, 19 May 2023 02:09:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbjESGJE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 19 May 2023 02:09:04 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39DEE10DC for <linux-kernel@vger.kernel.org>; Thu, 18 May 2023 23:09:03 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1ae87bdc452so557685ad.2 for <linux-kernel@vger.kernel.org>; Thu, 18 May 2023 23:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684476542; x=1687068542; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=acsQIdfOS76XIGk2swzVCmK3bhSNOQiVKEd2nYdPHpU=; b=Z2qCGytiQpchdC6MxLuKGoEvkb2VfBPkRy2QsiC5Q1O3AOnOKHJw9in47cqEYkMy1I UPEYPuSkizH6nzxRp4OEjAUDHKoFHVK/io21UxMWJvdD2YgbVZiQmK4w4ntxX/i99Av1 NwC3B7dkT63/FH02hZu2VNkDBWg3TRTVFbZduKLgPy3OijMuBjGU0eBtkzARLBCIpTy/ ApmtnZNeI22IkxZM1GMfsBFwNTPEiahf6S9R1WHykTKppX3Afs8hR4sUWC4f4f1HE3/6 bWmD7YMPpR2bAu5zaMs6o+HF13Dwhza2abnLD8ZPoOEnAtexriKADNnqPtBtTdPIKtDZ N8YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684476542; x=1687068542; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=acsQIdfOS76XIGk2swzVCmK3bhSNOQiVKEd2nYdPHpU=; b=L8I93e6S2xomgIsem5eRz2acIUNIRZxGFS7XTkFdXpqDOfa/Vagr+wDRvKH5XePTzs pArbAq+kcuOiIEUmOOLkq4NosnZvfF4z8QW4GOXNVoRIVyeJhBZzDpCglFxV0jktIMA1 IJf//aj9bNiUIrJzc0Yqv0mIKk9BIq0hLB1n7H+3YRJh1/eABxOhVAmEX5tCbd7lIBji d0Dh3xjU44BWT2d/BDfaBF7S7z4yRw9YU/wwg+GvRcQK9D3SGD+QzfDM8gc9f/+aA1RC nl2KGkAsLnFifmaRZNBtz+G6KsVFirDOnCK6i4kNw4rQnHQ7UOknXD5PCfMWNCH9a2Jf Mzlw== X-Gm-Message-State: AC+VfDx7hi30HNEDrdUa6ZFBt/qt5+Gx3mq1KwOyCydlAK3rOeh1gm7W 3hdBeoFsN0PqdWvMpSxu/WU= X-Received: by 2002:a17:902:e848:b0:1ad:d500:19d3 with SMTP id t8-20020a170902e84800b001add50019d3mr1989643plg.23.1684476542275; Thu, 18 May 2023 23:09:02 -0700 (PDT) Received: from localhost.localdomain ([221.226.144.218]) by smtp.gmail.com with ESMTPSA id u1-20020a17090282c100b001a64a2b790fsm2508936plz.164.2023.05.18.23.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 23:09:01 -0700 (PDT) From: Song Shuai <suagrfillet@gmail.com> To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, jeeheng.sia@starfivetech.com, mason.huo@starfivetech.com, conor.dooley@microchip.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Song Shuai <suagrfillet@gmail.com> Subject: [PATCH] riscv: hibernation: Replace jalr with jr before suspend_restore_regs Date: Fri, 19 May 2023 14:08:54 +0800 Message-Id: <20230519060854.214138-1-suagrfillet@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <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?1766302755542649026?= X-GMAIL-MSGID: =?utf-8?q?1766302755542649026?= |
Series |
riscv: hibernation: Replace jalr with jr before suspend_restore_regs
|
|
Commit Message
Song Shuai
May 19, 2023, 6:08 a.m. UTC
No need to link the x1/ra reg via jalr before suspend_restore_regs
So it's better to replace jalr with jr.
Signed-off-by: Song Shuai <suagrfillet@gmail.com>
---
arch/riscv/kernel/hibernate-asm.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
looks good to me. Thanks Regards Jee Heng > -----Original Message----- > From: Song Shuai <suagrfillet@gmail.com> > Sent: Friday, May 19, 2023 2:09 PM > To: paul.walmsley@sifive.com; palmer@dabbelt.com; aou@eecs.berkeley.edu; JeeHeng Sia <jeeheng.sia@starfivetech.com>; Mason > Huo <mason.huo@starfivetech.com>; conor.dooley@microchip.com > Cc: linux-riscv@lists.infradead.org; linux-kernel@vger.kernel.org; Song Shuai <suagrfillet@gmail.com> > Subject: [PATCH] riscv: hibernation: Replace jalr with jr before suspend_restore_regs > > No need to link the x1/ra reg via jalr before suspend_restore_regs > So it's better to replace jalr with jr. > > Signed-off-by: Song Shuai <suagrfillet@gmail.com> > --- > arch/riscv/kernel/hibernate-asm.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/kernel/hibernate-asm.S b/arch/riscv/kernel/hibernate-asm.S > index effaf5ca5da0..5c76671c7e15 100644 > --- a/arch/riscv/kernel/hibernate-asm.S > +++ b/arch/riscv/kernel/hibernate-asm.S > @@ -50,7 +50,7 @@ ENTRY(hibernate_restore_image) > REG_L s4, restore_pblist > REG_L a1, relocated_restore_code > > - jalr a1 > + jr a1 > END(hibernate_restore_image) > > /* > @@ -73,5 +73,5 @@ ENTRY(hibernate_core_restore_code) > REG_L s4, HIBERN_PBE_NEXT(s4) > bnez s4, .Lcopy > > - jalr s2 > + jr s2 I am content with these changes, as they do not involve a return after the jump > END(hibernate_core_restore_code) > -- > 2.20.1
> -----Original Message----- > From: JeeHeng Sia > Sent: Friday, May 19, 2023 6:45 PM > To: 'Song Shuai' <suagrfillet@gmail.com>; paul.walmsley@sifive.com; palmer@dabbelt.com; aou@eecs.berkeley.edu; Mason Huo > <mason.huo@starfivetech.com>; conor.dooley@microchip.com > Cc: linux-riscv@lists.infradead.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH] riscv: hibernation: Replace jalr with jr before suspend_restore_regs > > looks good to me. > > Thanks > Regards > Jee Heng > > -----Original Message----- > > From: Song Shuai <suagrfillet@gmail.com> > > Sent: Friday, May 19, 2023 2:09 PM > > To: paul.walmsley@sifive.com; palmer@dabbelt.com; aou@eecs.berkeley.edu; JeeHeng Sia <jeeheng.sia@starfivetech.com>; > Mason > > Huo <mason.huo@starfivetech.com>; conor.dooley@microchip.com > > Cc: linux-riscv@lists.infradead.org; linux-kernel@vger.kernel.org; Song Shuai <suagrfillet@gmail.com> > > Subject: [PATCH] riscv: hibernation: Replace jalr with jr before suspend_restore_regs > > > > No need to link the x1/ra reg via jalr before suspend_restore_regs > > So it's better to replace jalr with jr. > > > > Signed-off-by: Song Shuai <suagrfillet@gmail.com> > > --- > > arch/riscv/kernel/hibernate-asm.S | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/riscv/kernel/hibernate-asm.S b/arch/riscv/kernel/hibernate-asm.S > > index effaf5ca5da0..5c76671c7e15 100644 > > --- a/arch/riscv/kernel/hibernate-asm.S > > +++ b/arch/riscv/kernel/hibernate-asm.S > > @@ -50,7 +50,7 @@ ENTRY(hibernate_restore_image) > > REG_L s4, restore_pblist > > REG_L a1, relocated_restore_code > > > > - jalr a1 > > + jr a1 > > END(hibernate_restore_image) > > > > /* > > @@ -73,5 +73,5 @@ ENTRY(hibernate_core_restore_code) > > REG_L s4, HIBERN_PBE_NEXT(s4) > > bnez s4, .Lcopy > > > > - jalr s2 > > + jr s2 > I am content with these changes, as they do not involve a return after the jump Reviewed-by: JeeHeng Sia <jeeheng.sia@starfivetech.com > Thanks Regards Jee Heng > > END(hibernate_core_restore_code) > > -- > > 2.20.1
On Fri, 19 May 2023 14:08:54 +0800, Song Shuai wrote: > No need to link the x1/ra reg via jalr before suspend_restore_regs > So it's better to replace jalr with jr. > > Applied, thanks! [1/1] riscv: hibernation: Replace jalr with jr before suspend_restore_regs https://git.kernel.org/palmer/c/650ea2a1dd96 Best regards,
Hello: This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <palmer@rivosinc.com>: On Fri, 19 May 2023 14:08:54 +0800 you wrote: > No need to link the x1/ra reg via jalr before suspend_restore_regs > So it's better to replace jalr with jr. > > Signed-off-by: Song Shuai <suagrfillet@gmail.com> > --- > arch/riscv/kernel/hibernate-asm.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Here is the summary with links: - riscv: hibernation: Replace jalr with jr before suspend_restore_regs https://git.kernel.org/riscv/c/650ea2a1dd96 You are awesome, thank you!
diff --git a/arch/riscv/kernel/hibernate-asm.S b/arch/riscv/kernel/hibernate-asm.S index effaf5ca5da0..5c76671c7e15 100644 --- a/arch/riscv/kernel/hibernate-asm.S +++ b/arch/riscv/kernel/hibernate-asm.S @@ -50,7 +50,7 @@ ENTRY(hibernate_restore_image) REG_L s4, restore_pblist REG_L a1, relocated_restore_code - jalr a1 + jr a1 END(hibernate_restore_image) /* @@ -73,5 +73,5 @@ ENTRY(hibernate_core_restore_code) REG_L s4, HIBERN_PBE_NEXT(s4) bnez s4, .Lcopy - jalr s2 + jr s2 END(hibernate_core_restore_code)