From patchwork Thu Jun 3 12:52:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 12297183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 130B0C4709A for ; Thu, 3 Jun 2021 12:59:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7161613E7 for ; Thu, 3 Jun 2021 12:58:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7161613E7 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=mail.ustc.edu.cn Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vj3g7s/Ga4A0CxB1xQNwrdUAVjH8pBY2/2R+AmRbx7c=; b=C0xWajs9cspmx8 lMXDlWykEY5J+lNC3FXQNh5yr2vbv7m5h/s+/YpJ2NgZrygVleHYJ8Z6E9afNR171k8ccA4LL9TF0 fqEm/elvAwAoewPbNULLoxy8p24LvTqkDE1aVo73ZoypLwag990WQJcb8kB/DcHKOQkgt9988DWXJ Vf7XzWpaWYBA1jLCuvyd5j+12NDHHZ582Wllq72gjm22pBAA1k72Oao25UA+9iUbRceQMCogPLGiP SfS9CyTvHFnhE1sxxl0vVJX3Do/2A8SI+8GP8q/J0iNnOkU/y8FJupE2x9UTixfbr9Zh3v2h1K8nt 1LJH+umIts3GGqZltSjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lomvs-008o2I-Kj; Thu, 03 Jun 2021 12:58:44 +0000 Received: from email6.ustc.edu.cn ([2001:da8:d800::8] helo=ustc.edu.cn) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lomvm-008nz2-Iw for linux-riscv@lists.infradead.org; Thu, 03 Jun 2021 12:58:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ustc.edu.cn; s=dkim; h=Received:Date:From:To:Cc:Subject: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=DvvJuLb2rfdoEExLBPoteERVYd+uKTyTBxcJHZYUkzg=; b=QAFOrWpn+LUXr 4jjeqK5uRws6anp5tIw6RCB/qto1iT7b5QgOmOjBGh2P24JXb/mwq7AcJsTnbWiJ 0xlwpGqmIx08GNDlnGFQbMqJJuLeqWI3tDiJEwFTL2YO9qEJXXVm4tEJY5u4bOGN ZFvKpJ4R0HjAVSi8+rc2HBK1QZXSpk= Received: from xhacker (unknown [101.86.20.15]) by newmailweb.ustc.edu.cn (Coremail) with SMTP id LkAmygD3+YHa0bhg8g2JAA--.32624S2; Thu, 03 Jun 2021 20:58:03 +0800 (CST) Date: Thu, 3 Jun 2021 20:52:37 +0800 From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Alexandre Ghiti , Vitaly Wool , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] riscv: mm: Remove va_kernel_xip_pa_offset symbol from !XIP case Message-ID: <20210603205237.645607ca@xhacker> MIME-Version: 1.0 X-CM-TRANSID: LkAmygD3+YHa0bhg8g2JAA--.32624S2 X-Coremail-Antispam: 1UD129KBjvdXoW7JFWxAr1fWFyxCF1DKw45Jrb_yoWfWrg_G3 4kJr1fWFyaqrs293W3JrWfWrWjy3s5XFykC3Z7W34Yy3sIyr1fJrWaka4rXw1UurWfCFWr ZFyUAF9ayw1YvjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbrAYjsxI4VWxJwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IE w4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMc vjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCF s4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r 1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWU JVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6F yj6rWUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4U JbIYCTnIWIevJa73UjIFyTuYvjxUznmRUUUUU X-CM-SenderInfo: xmv2xttqjtqzxdloh3xvwfhvlgxou0/ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210603_055839_205982_7AB1F9FC X-CRM114-Status: UNSURE ( 5.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The va_kernel_xip_pa_offset is only accessed for XIP case, so make it only available for XIP. Signed-off-by: Jisheng Zhang --- arch/riscv/mm/init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index ae32f78207f0..ca2826778989 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -194,10 +194,8 @@ EXPORT_SYMBOL(va_kernel_pa_offset); #endif #ifdef CONFIG_XIP_KERNEL #define va_kernel_pa_offset (*((unsigned long *)XIP_FIXUP(&va_kernel_pa_offset))) -#endif unsigned long va_kernel_xip_pa_offset __ro_after_init; EXPORT_SYMBOL(va_kernel_xip_pa_offset); -#ifdef CONFIG_XIP_KERNEL #define va_kernel_xip_pa_offset (*((unsigned long *)XIP_FIXUP(&va_kernel_xip_pa_offset))) #endif unsigned long pfn_base __ro_after_init;