Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1513785ybj; Fri, 20 Sep 2019 11:43:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOuJwpgLDLTZf6W42AcjF3ocEcjzuyulL1c2OuTmAVS0g7FA4zVQYTzIndyhh8Ql8Ud9Lf X-Received: by 2002:a17:906:48e:: with SMTP id f14mr4064441eja.15.1569005033865; Fri, 20 Sep 2019 11:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569005033; cv=none; d=google.com; s=arc-20160816; b=y2L8FBsjKAFzl1IdmUK7OFrhTf+S/vu3chfmHxx8aeMIUEgnaH6vFPoYqKRT278TAB lCttoGNj0JsYeSeCXmDamaFAXg1aVtqqtJWqlwthEwhxdGscHgCNHf0Ig8MsLsSp5pwL n8b0yiTDzoBqM78SPb0hfBrSampavNUfQg5LcTD5YxOk+fIWDv/iTnj6FM2EzwsMt5aF GpSx61y8dc9r4zga8Y3o3FFau8JbsYGmLbWO9OFShxQllVkGG79MewojFakF6WbQ2YJ/ h0a+/WCJ2R8TfgywMBH88024mAmhNeuYPIv0KBrYpZnPUVaEQT1EVTu9PhvB1Cck62z6 bVoA== 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=P8Hzomu1bdBnvNxRMUkKrcfMazBVRlFTpE491yGI5K02ObJX3zLELg45qZtNOwxYtH nbe9NtaIFEgpOQx9OlfjiKBHbfE0VE3/ipPXDjZCPVXdwBsFkvOIhGqSbuMOATxiCR7L j000hEntfA36jFm+gnAt7VdVyEiAiX0A35rs8CBfqxngoyHLpVD9/qWB+84ki6g4iBsf 28DjQ7xNV1MbU6wVxZeMluCE5SFIj8AAEeZBU8UvyM7vQyi00xtVYp2v2Rhwr9ENm88g x1TJDsDLExFjYIbIgvarNHEOUEAty3SQOfkkSzAky+UCGIs/RerJVjlonJPLjKZszOLq iQzg== 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 q7si1409496ejo.388.2019.09.20.11.43.30; Fri, 20 Sep 2019 11:43:53 -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 S2408473AbfITJZ0 (ORCPT + 99 others); Fri, 20 Sep 2019 05:25:26 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:55558 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2408445AbfITJZZ (ORCPT ); Fri, 20 Sep 2019 05:25:25 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 41D85F2F6259E1ED2F63; Fri, 20 Sep 2019 17:25:24 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 20 Sep 2019 17:25:18 +0800 From: Jason Yan To: , , , , , , , , CC: , , , , , , , Jason Yan Subject: [PATCH v7 02/12] powerpc: move memstart_addr and kernstart_addr to init-common.c Date: Fri, 20 Sep 2019 17:45:36 +0800 Message-ID: <20190920094546.44948-3-yanaijie@huawei.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190920094546.44948-1-yanaijie@huawei.com> References: <20190920094546.44948-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