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 6137BC433EF for ; Tue, 8 Feb 2022 06:11:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242975AbiBHGLv (ORCPT ); Tue, 8 Feb 2022 01:11:51 -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-Google-Smtp-Source: ABdhPJyoKG0uf9goGLZSjJNhyKf+bvy86AJ6ENV92VZKmmSAQhXAV+vpsm1T7Vkj70pF26s11ZlBhJpkUaWtRESj8gk= 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" Precedence: bulk List-ID: X-Mailing-List: devicetree@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/