Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1589209pxb; Tue, 8 Feb 2022 23:18:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWIYZ9WFHS/dOQHpQqNRVmAPHNuERg/r+oTzc1fzr3BqP6DY3x5SmHqcFh30xsraLDjubB X-Received: by 2002:a17:907:6eac:: with SMTP id sh44mr744756ejc.473.1644391111291; Tue, 08 Feb 2022 23:18:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644391111; cv=none; d=google.com; s=arc-20160816; b=Ofny3koeWFpJafLPdrMulnP7pWfl7GMV1EPUIEjSOI076Kn/iurLYMTUOTd0Fn0pRJ 8M7IbtRS3zkksAbzDG1qbUKfuW0T5AzeRYT73WkGPSnvhVNoFozV1l8i0oT5Lb0ec5Tb yXLrmrRp9ci3ATspjzdUWXASH4IO9eJJ1xfM9azvgw3s3+0XhPxdHUDC8hU9gG7YyI/T z172qp2Tt0lRPhC7aCs6dH+q+QY2idf9Mt3fWewv8M+dcuDJOVdqEHEAJMJaJSr3qxkL XpXq+7xDk1baTUpIONS+HUsh49w7yc9nomdoQAPyK9KrGKWJYIwfjf13QmKwSOcLLSC7 2nUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sP5uQxJ+bxTio0Ofo8l34sqBmctCyBOhpVNFU/2sKP8=; b=hmGDVURKUC88epeXMZwA9cJ2QQJ9hIkqgTmjx0+VirSURy8P8rUuR1K6qIc4V506Mu zekUhGqVFnKzBsSjYeaZZzke8cIXolpx8V2cW7y46SZGGC32G6Amad7mwwwA8WqDJaGj /vAWA72zR1jsmKcZDaHahflZIXnLsHi7YnCDzJTpqbTAya7MmvYv1wOZevqW3fEG1r5u E4fryoMTrCw+/HcFgncjSJEDJIJpPG2OqU0Ve6hHDaKoDfo4YRwyP+Ua60ZCnH1kXVqY yJThrS/Rx5FE1XWUlFdRBJnrOo08btABnjY24416Rgr8jqOAn7IYMtlU1r7tUJXbDYmE JqQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dkarkc84; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si11661615edc.420.2022.02.08.23.18.06; Tue, 08 Feb 2022 23:18:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dkarkc84; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346000AbiBHGLx (ORCPT + 99 others); Tue, 8 Feb 2022 01:11:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233167AbiBHGLv (ORCPT ); Tue, 8 Feb 2022 01:11:51 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE82BC0401DC; Mon, 7 Feb 2022 22:11:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 048F2CE136D; Tue, 8 Feb 2022 06:11:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18DAAC340FA; Tue, 8 Feb 2022 06:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644300705; bh=98Jh+JdWit2Ec3uBZ9fZIIVMOmAGVkhi9qoKSGmN8mE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dkarkc84bxml1mYT97ga5a+lFTT5OA3SIThy/3q5pqmFTn+KKM8Wg/T9xSG65SqlF WLPC5nfYthRwdLylQ3ozJKWc5Tvp6yGUIofsIZlxG4v0KCS6gYJYZPIeo/F4MgOlTJ Q7H/dx9Mbl7Mn6qjOOUcEdADy2vJgJh+vOdGgX1ZZtLQZWWDJ2E8zNNoDMp0uLvrGS 0fec9ZljUZ42rP+thwv1TLb4835/iY1wMkbYXnK1osqEJFPOXkcwjHqPwYaB1V0ROv gLVs9OBYLHSqGC7finXbpaw8HivhQcd0m0xpbpN7bV/shGYT8WaGdn+NO9dLe5h3kq sgjpEzPLES1QQ== Received: by mail-vs1-f48.google.com with SMTP id g10so2258313vss.1; Mon, 07 Feb 2022 22:11:45 -0800 (PST) X-Gm-Message-State: AOAM530JkzbCupbTvdOoKjzq/IYazaNil5n7yMzP8T0KvBdAuf/snDU5 Bt5j0Ly/h1FCrQOuf6hc7c8zt9qZr4mcy1hk34o= X-Received: by 2002:a67:ec4e:: with SMTP id z14mr1017480vso.8.1644300703865; Mon, 07 Feb 2022 22:11:43 -0800 (PST) MIME-Version: 1.0 References: <20220126114452.692512-1-apatel@ventanamicro.com> <20220126114452.692512-3-apatel@ventanamicro.com> In-Reply-To: <20220126114452.692512-3-apatel@ventanamicro.com> From: Guo Ren Date: Tue, 8 Feb 2022 14:11:32 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v10 2/8] RISC-V: Rename relocate() and make it global To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , Daniel Lezcano , Ulf Hansson , "Rafael J . Wysocki" , Pavel Machek , Rob Herring , Sandeep Tripathy , Atish Patra , Alistair Francis , Liush , Anup Patel , devicetree , linux-riscv , Linux Kernel Mailing List , linux-pm@vger.kernel.org, Linux ARM , kvm-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Reviewed-by: Guo Ren On Wed, Jan 26, 2022 at 7:46 PM Anup Patel wrote: > > From: Anup Patel > > The low-level relocate() function enables mmu and relocates > execution to link-time addresses. We rename relocate() function > to relocate_enable_mmu() function which is more informative. > > Also, the relocate_enable_mmu() function will be used in the > resume path when a CPU wakes-up from a non-retentive suspend > so we make it global symbol. > > Signed-off-by: Anup Patel > Signed-off-by: Anup Patel > --- > arch/riscv/kernel/head.S | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S > index 2363b43312fc..5f4c6b6c4974 100644 > --- a/arch/riscv/kernel/head.S > +++ b/arch/riscv/kernel/head.S > @@ -90,7 +90,8 @@ pe_head_start: > > .align 2 > #ifdef CONFIG_MMU > -relocate: > + .global relocate_enable_mmu > +relocate_enable_mmu: > /* Relocate return address */ > la a1, kernel_map > XIP_FIXUP_OFFSET a1 > @@ -185,7 +186,7 @@ secondary_start_sbi: > /* Enable virtual memory and relocate to virtual address */ > la a0, swapper_pg_dir > XIP_FIXUP_OFFSET a0 > - call relocate > + call relocate_enable_mmu > #endif > call setup_trap_vector > tail smp_callin > @@ -329,7 +330,7 @@ clear_bss_done: > #ifdef CONFIG_MMU > la a0, early_pg_dir > XIP_FIXUP_OFFSET a0 > - call relocate > + call relocate_enable_mmu > #endif /* CONFIG_MMU */ > > call setup_trap_vector > -- > 2.25.1 > > > -- > kvm-riscv mailing list > kvm-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kvm-riscv -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/