Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp82296ybl; Fri, 9 Aug 2019 02:52:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwysqB75iTkmhOnflxoNbMcxtXCfqX1NXQp45QX4gTO8/dPx02+ZXxKBwRtqI3NeqHx8AQi X-Received: by 2002:a17:90a:32c7:: with SMTP id l65mr8548250pjb.1.1565344378104; Fri, 09 Aug 2019 02:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565344378; cv=none; d=google.com; s=arc-20160816; b=qpvBwktD9u0VftdApuhQCYwoqblcTxQSsVcVyLh9AqR5CB9i/aQNGiYUkseeG9xOeJ Ln3HEvwwF1Px5HD8soOqKannWmdeFu9pvwCKmiH9cxZkhEsHoU8Ev1GmGW9tIY3NcUG2 45Ib3kqgUrXgL1o3FJyPR1q0hXcHsmJEVL3inCQ/UlSfb9gknE+0BtQyfsVhiYlEjEEw qRqaekbICQdLppwbDglIukEx51riecDnTHqAgTrVWE7TBokKwPi5v84MKmn61EJYi3VT kOKLRLPTyHS1LAjDeE77IjbFP7BcZg+D+XkLm7jByItl/9mOKaV4/5HWyPvZN/HUCoSQ UtAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=H2s103qc3poraEr4Y+5+3/haNg5Wn360TRsBttXkwT4=; b=F99g2LBV09Dhj2shghjhvECFmkPHhFXouyBMu1ODvqp//d78SQL+ojZZf7XLDXpuGu wpFpMcWGd/5M7DAOlN7WvslDK4BCjwivU6o8vKU5wSduYtFi6+ZvY2Y2ErstmjEzxWGM YeEgZsJ6KsLz+fSJsKguXm9jr2QrB3sViXmdMsQQKF4LurFcsayRkkzTjLujsJiNBpab h737IO/irmb7+mAi9m6X6+AsimPULV0eQ8b+vWd/DAmGaXjx3AuUnhP0JPPpQodKGbif zH/+Q0cpFn3WP3yDMzxk4titAPQcUsGe2GDlbICCa6eZzSXxh/bnibFe/JX//FWOk/q3 vLXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f196si1315514pfa.57.2019.08.09.02.52.42; Fri, 09 Aug 2019 02:52:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406180AbfHIJwC (ORCPT + 99 others); Fri, 9 Aug 2019 05:52:02 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4214 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2406125AbfHIJwB (ORCPT ); Fri, 9 Aug 2019 05:52:01 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 086CDDCAC1ABFA942FFF; Fri, 9 Aug 2019 17:51:58 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Fri, 9 Aug 2019 17:51:51 +0800 From: Jason Yan To: , , , , , , , , CC: , , , , , , , Jason Yan Subject: [PATCH v6 02/12] powerpc: move memstart_addr and kernstart_addr to init-common.c Date: Fri, 9 Aug 2019 18:07:50 +0800 Message-ID: <20190809100800.5426-3-yanaijie@huawei.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190809100800.5426-1-yanaijie@huawei.com> References: <20190809100800.5426-1-yanaijie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c and make them __ro_after_init. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Tested-by: Diana Craciun --- arch/powerpc/mm/init-common.c | 5 +++++ arch/powerpc/mm/init_32.c | 5 ----- arch/powerpc/mm/init_64.c | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/init-common.c b/arch/powerpc/mm/init-common.c index a84da92920f7..e223da482c0c 100644 --- a/arch/powerpc/mm/init-common.c +++ b/arch/powerpc/mm/init-common.c @@ -21,6 +21,11 @@ #include #include +phys_addr_t memstart_addr __ro_after_init = (phys_addr_t)~0ull; +EXPORT_SYMBOL_GPL(memstart_addr); +phys_addr_t kernstart_addr __ro_after_init; +EXPORT_SYMBOL_GPL(kernstart_addr); + static bool disable_kuep = !IS_ENABLED(CONFIG_PPC_KUEP); static bool disable_kuap = !IS_ENABLED(CONFIG_PPC_KUAP); diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index b04896a88d79..872df48ae41b 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -56,11 +56,6 @@ phys_addr_t total_memory; phys_addr_t total_lowmem; -phys_addr_t memstart_addr = (phys_addr_t)~0ull; -EXPORT_SYMBOL(memstart_addr); -phys_addr_t kernstart_addr; -EXPORT_SYMBOL(kernstart_addr); - #ifdef CONFIG_RELOCATABLE /* Used in __va()/__pa() */ long long virt_phys_offset; diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index a44f6281ca3a..c836f1269ee7 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -63,11 +63,6 @@ #include -phys_addr_t memstart_addr = ~0; -EXPORT_SYMBOL_GPL(memstart_addr); -phys_addr_t kernstart_addr; -EXPORT_SYMBOL_GPL(kernstart_addr); - #ifdef CONFIG_SPARSEMEM_VMEMMAP /* * Given an address within the vmemmap, determine the pfn of the page that -- 2.17.2