From patchwork Tue Apr 5 08:22:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Feng X-Patchwork-Id: 65059 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp327111lbc; Tue, 5 Apr 2016 01:28:20 -0700 (PDT) X-Received: by 10.66.246.165 with SMTP id xx5mr60302446pac.87.1459844900793; Tue, 05 Apr 2016 01:28:20 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uk4si6277952pab.234.2016.04.05.01.28.20; Tue, 05 Apr 2016 01:28:20 -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 S1757504AbcDEI2R (ORCPT + 29 others); Tue, 5 Apr 2016 04:28:17 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:51691 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754902AbcDEI2P (ORCPT ); Tue, 5 Apr 2016 04:28:15 -0400 Received: from 172.24.1.47 (EHLO szxeml434-hub.china.huawei.com) ([172.24.1.47]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DER15479; Tue, 05 Apr 2016 16:23:02 +0800 (CST) Received: from vm163-62.huawei.com (10.184.163.62) by szxeml434-hub.china.huawei.com (10.82.67.225) with Microsoft SMTP Server id 14.3.235.1; Tue, 5 Apr 2016 16:22:53 +0800 From: Chen Feng To: , , , , , , , , , , , CC: , , , , , , , , , Subject: [PATCH 1/2] arm64: mem-model: add flatmem model for arm64 Date: Tue, 5 Apr 2016 16:22:51 +0800 Message-ID: <1459844572-53069-1-git-send-email-puck.chen@hisilicon.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.184.163.62] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0203.570375E9.0063, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d263db39f737dda0b4a13271db4032b8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We can reduce the memory allocated at mem-map by flatmem. currently, the default memory-model in arm64 is sparse memory. The mem-map array is not freed in this scene. If the physical address is too long, it will reserved too much memory for the mem-map array. Signed-off-by: Chen Feng Signed-off-by: Fu Jun --- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 4f43622..c18930d 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -559,6 +559,9 @@ config ARCH_SPARSEMEM_ENABLE def_bool y select SPARSEMEM_VMEMMAP_ENABLE +config ARCH_FLATMEM_ENABLE + def_bool y + config ARCH_SPARSEMEM_DEFAULT def_bool ARCH_SPARSEMEM_ENABLE