Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp565579pxb; Tue, 15 Feb 2022 22:15:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwA5zHYKgS8b+6Dml2QmZ+94Mi8xD5tVZFI3LZtdxbrO4lTQcev2qeCxA0ondidQZ40Qikm X-Received: by 2002:a63:30b:0:b0:364:3dc6:1ee8 with SMTP id 11-20020a63030b000000b003643dc61ee8mr1072299pgd.470.1644992122859; Tue, 15 Feb 2022 22:15:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644992122; cv=none; d=google.com; s=arc-20160816; b=Auqyi9dB9y03lF63M8PUW+wu6FzKXEB7FkMc+nwBoYn3WKIAe7NIssjw3wPAghsHa2 sQslMdI+sQc89Fy2W99ETGqs06dV7SNS+xdOcP3FveJlgjovqMBL6rj2UTUkr67mkYbn tVmjEDFKVyP68xwrNTsIpclDUzv/h4X+pdJ/kvhTMwsl3PgJtUtU6t36Yic6R67r8dBJ hJdikLKUQ4uThshpVd2BicM8mS6YSmUVVp24YG3ZLHQLTAd21NxuncFHXDJGe34VpJ8h KdKQyvMwWLf1XbJ/Y3hGua12Y8SEyAsV8hiIKQVvOOrPyWXPZ43ykhDrBW9rScp3k1U+ PCXg== 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=U8G5LYNj0LAd4VWKhX4PRkQunQsiCSSKv2IZ3Pf+XZs=; b=jzJ6FJTRC57ow2OCVmBnsXzTSSs2WqOVSAPW+UV4zMGksTy6BD0U84AcE/TLMwZoRy JWJn2G+rD6swSi+aeAyVUWk3GlOy4OVD8TKO/F9DanQ6bgAOenjI4PlI9/c4ai7Gsocj Nqgc2342lhiFQF/95tMn+5O4GCtcYDBjplptV8emwcz1C4U9+ZknJyI/LWu91B1OscU9 1Zg25nNRAuMy9oJc1DVBP/GNfUEVnBkAsk9s1p625yJYofiaR/7toeNlZDLAIATOGdip rM2VLymCViOqAVLnQew92D1bxpLR93caTyl/LAsF6o6uGg85vr/JRMnBvNVno00/HZ6t oxwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=gpERkwaS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id oj18si11073840pjb.68.2022.02.15.22.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:15:22 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=gpERkwaS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 037E418CC62; Tue, 15 Feb 2022 22:14:35 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245202AbiBPA5a (ORCPT + 99 others); Tue, 15 Feb 2022 19:57:30 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245200AbiBPA53 (ORCPT ); Tue, 15 Feb 2022 19:57:29 -0500 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64816E6DA0 for ; Tue, 15 Feb 2022 16:57:18 -0800 (PST) Received: by mail-yb1-xb2e.google.com with SMTP id 124so1239422ybn.11 for ; Tue, 15 Feb 2022 16:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U8G5LYNj0LAd4VWKhX4PRkQunQsiCSSKv2IZ3Pf+XZs=; b=gpERkwaSaLIxACa9WIVhxhGtJssexFQa3ON9pkBRsTjx4PNq0MQw2kjCHUZz4hQjFI X4MeU8dMf0P33tjb48vBqe9UNBGOrBYQpILedHOhpC7eX44P1DuShRsNX9XjfoAcud+f y8FClYnR/o87poChRgDdKBi4llSa+2dvnrZXE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U8G5LYNj0LAd4VWKhX4PRkQunQsiCSSKv2IZ3Pf+XZs=; b=rCiPeu+yqR36tPDpdnYzpASpO3pWpYkYOmQHFoPB6p9JQNF7kpZVlUV8kFoB9SqGIr z6Rx+7SiieRUeiB8DvESeOoB9NqHBpyeCOi0L6X3U79wDeTuuqHsOILzrH2OoKyihLS8 JAK34Ip4TbWXIf5M1Kxi7EM2KLu+o+mC4pYocCQ+nH4BUeo00W+BdfPJasuZ48ALfxOL fwyVtKoWh3crt9hW8OQGV9IhQkkY8xSr8q1gKeOQGaZKDfhEW/Aa0LF/MwDEuYH3ZtSf j/MtGUIHauN0yTTh5cRh8GhPuGSVcOLWD4sFx0m392DQnmZatBzF9DpXvjjWwGHNp9S3 U0tg== X-Gm-Message-State: AOAM533RJ9xLaxDl/VCOzz+1mYnhjrakJV0K6bN6J2BNG3y624r65O0f jzwMTmi1154px9QN3yVyeIgaW+3O7undD5z4yghK X-Received: by 2002:a25:9388:0:b0:61d:6ff8:6472 with SMTP id a8-20020a259388000000b0061d6ff86472mr208446ybm.121.1644973037573; Tue, 15 Feb 2022 16:57:17 -0800 (PST) MIME-Version: 1.0 References: <20220210054947.170134-1-apatel@ventanamicro.com> <20220210054947.170134-3-apatel@ventanamicro.com> In-Reply-To: <20220210054947.170134-3-apatel@ventanamicro.com> From: Atish Patra Date: Tue, 15 Feb 2022 16:57:06 -0800 Message-ID: Subject: Re: [PATCH v11 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 , Alistair Francis , Liush , Anup Patel , devicetree , linux-riscv , "linux-kernel@vger.kernel.org List" , "open list:THERMAL" , "linux-arm-kernel@lists.infradead.org" , kvm-riscv@lists.infradead.org, Guo Ren Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Wed, Feb 9, 2022 at 9:50 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 > Reviewed-by: Guo Ren > --- > 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 > Reviewed-by: Atish Patra -- Regards, Atish