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: 8748791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 724AF9F36E for ; Tue, 5 Apr 2016 08:29:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F93C20320 for ; Tue, 5 Apr 2016 08:29:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8310D202BE for ; Tue, 5 Apr 2016 08:29:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1anMLO-0000Q7-02; Tue, 05 Apr 2016 08:28:14 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1anMLK-0000DW-58 for linux-arm-kernel@lists.infradead.org; Tue, 05 Apr 2016 08:28:12 +0000 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: , , , , , , , , , , , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160405_012810_592389_F2EAF5B1 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dan.zhao@hisilicon.com, xuyiping@hisilicon.com, puck.chen@foxmail.com, puck.chen@hisilicon.com, suzhuangluan@hisilicon.com, linuxarm@huawei.com, albert.lubing@hisilicon.com, saberlily.xia@hisilicon.com, oliver.fu@hisilicon.com, yudongbin@hislicon.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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