Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4059944rwo; Mon, 24 Jul 2023 23:14:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfN9qSGb9bX0hxK91xT6U1w11D/UoswZWoP8Q19XJyY5MxauV41sARSAOFYWKQYU05pAkq X-Received: by 2002:a05:6808:8d7:b0:3a0:5802:1b0a with SMTP id k23-20020a05680808d700b003a058021b0amr12376050oij.25.1690265686300; Mon, 24 Jul 2023 23:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690265686; cv=none; d=google.com; s=arc-20160816; b=EIUbU135W3C6e5KvLXueXLyey3RxY0H9/4DWXahu7PLB21ykOX5uFPeWLE18oQEvFv WzRrDIqWpDgIJBpbtz6+3v+N9ERdG+9MYiWvuHZHd5RW8rkYeM0VbvvlQiV2DTkolTvN sIhBcSUtP4yh+gZqi2bIdKAN6DQHPSSgW713IBCW/RjzHbuqRT7BY8sKymV6ABZ3AusO LUhxIaLMWJwUdkhZIyhrH+pFQY7g6hEP5AONttE+3X8HnrqZG92xTHTqvTwPJkJRj9Wr 94PZzdNlzTnrw57wjDkfv9TJ9HZrM6C55c9/uHJzy5+7T8a8ub3jTRO4wttTtkH60NtI 4Q4g== 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=Y7e91BMfpSrUV8pLZU1LBjqTvh3MYJ90peEUrbZ0fJg=; fh=DWw/m7leqK8O00YWSSkuxYR3L6SUwWwm9AfXM4lIHCk=; b=QNM+nGvxkc37PpWikzZyz7bCNrfJ5qVB0EsQmtgc3hv75t39lO7M1SVWDQgOgMvP8/ JgzCyJ7X43cZF94CTBKNTWi+iLl8W2O0W5tMyLKCRc+U4x8mZRqt7aofKLFxdkI1S4Nb ul4VpjPkPmwFAP5xA+kQ03oG1u68gSpel20cyns3IQZ65K9XPGSaucrBczoo9U/ntNxl 5qXq271kus8IADLf78XEBiNqNtE1KljRRJT/n2NtbpXjXn+KHwafn6+iBREG3ftyhncb NjBdqBAe0x+lfrUSBGSYgeHpRj4eGMSsjN9AzqjGe0NicJskFWbksODgHlwAOGmjqyvb Ex2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=DUV24tjM; 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 l64-20020a639143000000b0055fec018757si10833209pge.152.2023.07.24.23.14.34; Mon, 24 Jul 2023 23:14:46 -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=DUV24tjM; 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 S231712AbjGYFi6 (ORCPT + 99 others); Tue, 25 Jul 2023 01:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230433AbjGYFi4 (ORCPT ); Tue, 25 Jul 2023 01:38:56 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD0A419AA for ; Mon, 24 Jul 2023 22:38:52 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-99313a34b2dso748918466b.1 for ; Mon, 24 Jul 2023 22:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690263531; x=1690868331; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Y7e91BMfpSrUV8pLZU1LBjqTvh3MYJ90peEUrbZ0fJg=; b=DUV24tjMeuaYTRh7/en2rwqUQ0+Z84MXh9/5CuvvoPYwgfUUGT5C92XvGlgjodir7I DdKAbGyDJNcNNPqr9M7EbSkoyGIxObjYdArkaS2KSPwsqM785K3rSeWH2Alvn9h05Qm9 WlBBkAH92Hur813wc/6oNLVSXUAGe/mMeRVieqSfSJ19PnFyaGu4YVDevZh7L7fxonT2 sqSu8jL3ZSNzRMIRmxTM8RV+tfF1B6W9NiMcG4tUSGvcUPqp+FGO0KmsC/NsSNLS+KOa JihUGIjt1i2UhE0zex4wEfQ1u1Q/lNxR7zu8ks9wdLNGSKmkgYYsckHHA7jJZfEk7TKd U3qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690263531; x=1690868331; 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=Y7e91BMfpSrUV8pLZU1LBjqTvh3MYJ90peEUrbZ0fJg=; b=HC7rumDlvDd1LVmNR6TS8UAbpKmQr6WQXEB/buv5VbKhYolX2B8ihp4bBWcicMxoLD Z6HjLqSVEGk7b6ua0C04oejddMetYlojRd9yHR5suUKMRREKVChEyIQ/i3zie0cXXLdn cC5Jn88OOvS0jbj9WyBdnpYad9uLQ7hT1pTSJxhb20sDFL9S6cnPMKLBMwVFehaDJn+h 9Db0xOc7kmfJtOWvx2z+XpJqaNJO7QrII2fNMSu5LApQgXpSB7Id7AsVd6P2GkGhiT3c I+X0y3PHmG7TVOpKK5A7QR/aduiolhxEewSVVjOw6FCcNCRFDTMXiezFhpCMpY2zbruy MqrQ== X-Gm-Message-State: ABy/qLYSusj8PhtYOqQvOchpt4KnRF2QxIr2aH43C7MGrw/H9mkvCV+G ywgwq6RMfGUA8P/2VI3ihaqiwf2W9Urmig== X-Received: by 2002:a17:907:a070:b0:993:da91:6e0c with SMTP id ia16-20020a170907a07000b00993da916e0cmr11226554ejc.3.1690263531214; Mon, 24 Jul 2023 22:38:51 -0700 (PDT) Received: from nam-dell (ip-217-105-46-58.ip.prioritytelecom.net. [217.105.46.58]) by smtp.gmail.com with ESMTPSA id jp7-20020a170906f74700b009937dbabbd5sm7639369ejb.220.2023.07.24.22.38.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 22:38:50 -0700 (PDT) From: Nam Cao To: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Nam Cao Subject: [PATCH] riscv: remove redundant mv instructions Date: Tue, 25 Jul 2023 07:38:35 +0200 Message-Id: <20230725053835.138910-1-namcaov@gmail.com> X-Mailer: git-send-email 2.34.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: X-Mailing-List: linux-kernel@vger.kernel.org Some mv instructions were useful when first introduced to preserve a0 and a1 before function calls. However the code has changed and they are now redundant. Remove them. Signed-off-by: Nam Cao --- arch/riscv/kernel/head.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 11c3b94c4534..3710ea5d160f 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -289,10 +289,6 @@ clear_bss: blt a3, a4, clear_bss clear_bss_done: #endif - /* Save hart ID and DTB physical address */ - mv s0, a0 - mv s1, a1 - la a2, boot_cpu_hartid XIP_FIXUP_OFFSET a2 REG_S a0, (a2) @@ -306,7 +302,7 @@ clear_bss_done: la a0, __dtb_start XIP_FIXUP_OFFSET a0 #else - mv a0, s1 + mv a0, a1 #endif /* CONFIG_BUILTIN_DTB */ call setup_vm #ifdef CONFIG_MMU -- 2.34.1