Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5486528pxb; Wed, 26 Jan 2022 13:10:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7rOlYFikKGseo8qbUsQmafRYgLGg5XIBl+Bb0hQIWhk86CgjSx3lS5tmHTdw7i4DWu0Iu X-Received: by 2002:a17:90b:1b46:: with SMTP id nv6mr797308pjb.178.1643231456562; Wed, 26 Jan 2022 13:10:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643231456; cv=none; d=google.com; s=arc-20160816; b=AilU+WYBkCD6BlqVNxmyE+s5XDDW/66YM+H271kDKjYw7dEl4PeF6lylcKcNtzek1t fg8sEhbcZuRjExGZfEt5FKHXAC8OeuO4i87qniGs5kn9UJMV1f0Fa76pNNq8vUvRyYij V2NcPyrxpCwPqUL5hnkwr7jpZqPZK29eHrY/yH6mdxdYaoRwUALJtoOqml7x7ambmSyd H1Hc+ngyHHj/8eg2eoax0xIgWkdqYiE3Xy2bMsVEDoSMXs2aGcb0R3sHh7BpB1FESXK+ w8Tg0BmCX47TLAOzUCEsiWMqF5oJdPimdvoK1Y33oztIAYvrnb/z6sdxTlp5p72kGG8J 9pzQ== 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=+fhSSByGJ1StCm+oVdHQ6+iIgAeqBD8uGJ6nIDfD98Q=; b=fDUjGKw6sM9LgFkgyPkoB5qXW16768/qiC0ud6lCWsu1fBuXDo9AAd5pm+IGH2Dhb2 99XS3uul2JPO9TqE6Us9Eb65V7bgsWlm635YHI7TDrBjzYMV3i08ENIs7WQBmSNCJsio k7JUp3qf1m4UANmriHMFI8DLzMXGWPSLqEnHObdo7GCWE2NLfVGMNVofujgAFblRGeOO fKK2O1B/7R1yz7mAVGmnf9kq6GLEEjoY772iBH1xZO0FY7PLcOArcTscGFnPL4vWX7xz /socubW3V+a6FrAO3nQ4B79gb5fDCdbUZw4+ZQD7S83ZoiOdU7vlg2QeEaftuJH7hhvK YBCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Xh3abpUh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t64si309204pgd.769.2022.01.26.13.10.44; Wed, 26 Jan 2022 13:10:56 -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=@ventanamicro.com header.s=google header.b=Xh3abpUh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240891AbiAZLpX (ORCPT + 99 others); Wed, 26 Jan 2022 06:45:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240894AbiAZLpW (ORCPT ); Wed, 26 Jan 2022 06:45:22 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47B18C061747 for ; Wed, 26 Jan 2022 03:45:22 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id d5so20517775pjk.5 for ; Wed, 26 Jan 2022 03:45:22 -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=+fhSSByGJ1StCm+oVdHQ6+iIgAeqBD8uGJ6nIDfD98Q=; b=Xh3abpUhKWutXSa5R1ZrcfayK4Iv8eorhSc5LPbUtCDbBFaBPa9kqT8qgAN7Phl8nU CgRXNkYUDQunBNy0SQFPU3KtLxi4nxKVsgyw1npo+bSHe/H7aRQobrLmSB2TwnU35k0O kju0hA7bIzlfmUL+MIGzuQRxAyP7rssltUN/QqFgxic+7sxSz+mSIAiJdpRhO7PRMd0y D8S7aUCAtEhuYBJecE11TgvnuE1237Ng9D32dCvoYNw57D5ci1E9lQVlxqJ9KARV940R J6qOe/dlg9eb1lWi2yiYIJ7wIzyN2rKRIw57gUVIFMPfEA5Nb41eT7R8VPyeoD1tCqX+ azcA== 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=+fhSSByGJ1StCm+oVdHQ6+iIgAeqBD8uGJ6nIDfD98Q=; b=xlUJQQJqea35ndmqI/Vw8amdQCZN8hpkYMdvu0N5QtWN/LKgI7B18Dhz02lpeOVex1 PVsJeV5vfXC2ID5QCHsjCAGKaWSCa8qMojkHw62GCVi8bkhr9avySVmtZeoi/hafn68G aUrpVYTiPEdBwxJ4PZO+FlRFtm1gTjLVomIwhDY+ZxIMjJV/hxkzI5Ey9SHag2Pr+Nfq 30ZW/rJr0PaTH5XXHXIVtfNcVeFAAqRCinPrq0d3YmghG2wrKPjzP+IkSMjzwVjgC8tG SU64Dx75LmT/q2nRduAJOPEQYI6BFvXRIbN3ZIc9YYPUYgiY7Kdf4ewo1EgLGUkriKkz FKig== X-Gm-Message-State: AOAM531JMFbMe3CO6PNZI41dI60HcS3fVYLNO83r1GIaD1oJF4ANKzU0 oKudnsC1WdQdl87I2WbZS0pVfg== X-Received: by 2002:a17:902:8544:b0:14a:bea3:1899 with SMTP id d4-20020a170902854400b0014abea31899mr22998561plo.143.1643197521827; Wed, 26 Jan 2022 03:45:21 -0800 (PST) Received: from localhost.localdomain ([122.167.221.23]) by smtp.gmail.com with ESMTPSA id nn2sm2994976pjb.35.2022.01.26.03.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 03:45:21 -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 Subject: [PATCH v10 2/8] RISC-V: Rename relocate() and make it global Date: Wed, 26 Jan 2022 17:14:46 +0530 Message-Id: <20220126114452.692512-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220126114452.692512-1-apatel@ventanamicro.com> References: <20220126114452.692512-1-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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