Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2632230pxb; Thu, 10 Feb 2022 01:53:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmZIp4Ida52WoEI3S43vUx5oLnjRIVtyItvigngAUqRzo2r+1zBqUBEJqsTicvgt//JFIb X-Received: by 2002:a05:6402:22f3:: with SMTP id dn19mr7578830edb.449.1644486832185; Thu, 10 Feb 2022 01:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644486832; cv=none; d=google.com; s=arc-20160816; b=YzL2sMuJkS9+0LGATe2fGKCHfIRInWnMunV66SuVySFIEwVXQVBSWrytiI9pTyZagn CPrAIWSh78zPS613gEmDi7eC0k4trod9kki7DZlBEz1lRJqCRGj4bm1sbvbW3HYOis8m EXT2y0SxckZpznY27SsGmhLYV70LM/D9Eiqz5WAmCBBrpbcKs5E088c3UzbCj31zkfHa yAhHRVXwSjVnf0/1Kib3sd9LivYzEvYU+0f/pY9p204yGrGJgUW04CJ4xmxzCJpo7WqH WOrGOsAb4F6kxWwutuSTW/SAaTqkGd4VQKLtFS7AMbBrKy225PkE/5Rl9OpMZUlAWoXJ ddEg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W6DnRCcGid35hmRCVAHPT4/JHmCQ1pX6LaO+zPetyxw=; b=fU3MH7tuWjL3GUf7IPDD2mciGsqOi7D4EGWEJx2QfxNFh7ygZk4muk+v0EP+XX7uML n2LwX9y07owk4ZzmDNQ5CXoBO1sYEKDq397V+HiJH/rgM1o4YaSzMEJ0L3QyM45LeGdb L1Tb3Pj7d4P6VR9Q5kCJcodMAh+zvhV98xDMBkJH9JyHmj9SzfJhFiXN5JNVMreqZ0Fz 1sEKrqYBBVyxxrg0v5V4g1yu401oMds6lDhMpHh5F+XRW0t7/XEQeEq0XKHw7qTOUHCG cZSooQ+J+17Xs3JVfW3qD8SHJXMIh6MugT/DO8QxiHZs3fA0HpKXLykoofxwqyiVzA/I iLAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=mSBtH4Ca; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he17si3109407ejc.552.2022.02.10.01.53.26; Thu, 10 Feb 2022 01:53:52 -0800 (PST) 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=@ventanamicro.com header.s=google header.b=mSBtH4Ca; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234785AbiBJFvA (ORCPT + 99 others); Thu, 10 Feb 2022 00:51:00 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234673AbiBJFuc (ORCPT ); Thu, 10 Feb 2022 00:50:32 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC9BB10EC for ; Wed, 9 Feb 2022 21:50:34 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id y8so5621470pfa.11 for ; Wed, 09 Feb 2022 21:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W6DnRCcGid35hmRCVAHPT4/JHmCQ1pX6LaO+zPetyxw=; b=mSBtH4Ca3FDB67dCd9NJOO5/JXrDvLAO3zTmf+dcTUfKJYtyIBbQVcQmfc+TqTl7O7 xZUysJohgWhF1eU0KpHG1mIuaQozOmy7kcfTjI6Vk6c7pnGAPt7Qexkgl4m1au+q80Ds 6IPqOLJ/JAMR8MRuKn3Md7bRY9JFCSTY+fKt7YBZrnVdf0bOPO9Nxzl4Kh5KDIJP11I+ +DfQDh5FJxLD7W4+LDs3w14PivdoAcBpuuc8NApLyqbWA9JvpDHf/uXzsaDi+G8RFPfc gJd337B7Zpc7vKgbDUSm9CddVhEyD86YvhhkzDHPdAgBfy1/smNKGgImbnM8dAwsuKcc YCzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W6DnRCcGid35hmRCVAHPT4/JHmCQ1pX6LaO+zPetyxw=; b=Zo9j+eN0wePKjnio0BrwrEb+W7eSep/Odqr/bvYTkziZ/IC1iUrC04M8i+dTzP6kJn HI4fSB7Z76KnPRE5YL33xmGnN7SfZ8pW/1i1movNyBgRAEDyQme/BgFoNSzPGV99VrLG DR0AJLIzLoJ2Xvc3FrPsyROp8Oz7V6vXwCXPahOHgxiEu/wz3j2mP87KcDWWF4/TUZqc 7TGMUxjpBJpUQ1ndMy506LmEAk/IhPZl8WnzLP9IoUevgFabTdHHzcFVRxHP1sCIuDUg IJj7NOMsrrnKoT0M3C6/f7h81U6zTEo2ViS3BPGNx8ndXzQF4HmEZM/5EUdzP+KpqR81 Jw0g== X-Gm-Message-State: AOAM530HbP5BhOMdKKDU+xCWZMPlLQIFYH4CnmzXP+1gh0WtM7CB38ES SyWMiFVK0umHUP0D++G+nMZfIQ== X-Received: by 2002:a63:4b17:: with SMTP id y23mr4834549pga.489.1644472234077; Wed, 09 Feb 2022 21:50:34 -0800 (PST) Received: from localhost.localdomain ([122.179.114.46]) by smtp.gmail.com with ESMTPSA id s32sm15192270pfw.80.2022.02.09.21.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 21:50:33 -0800 (PST) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Albert Ou , Daniel Lezcano , Ulf Hansson , "Rafael J . Wysocki" , Pavel Machek , Rob Herring Cc: Sandeep Tripathy , Atish Patra , Alistair Francis , Liush , Anup Patel , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvm-riscv@lists.infradead.org, Anup Patel , Guo Ren Subject: [PATCH v11 2/8] RISC-V: Rename relocate() and make it global Date: Thu, 10 Feb 2022 11:19:41 +0530 Message-Id: <20220210054947.170134-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220210054947.170134-1-apatel@ventanamicro.com> References: <20220210054947.170134-1-apatel@ventanamicro.com> 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,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 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