From patchwork Mon Sep 7 19:40:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 53250 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 9BBCE22B05 for ; Mon, 7 Sep 2015 19:40:47 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf28230402lbb.2 for ; Mon, 07 Sep 2015 12:40:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version:content-type:sender :precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=PaA0BN7rF2vGlJU27nW52+15KsvUFUTv1/IkcLOmBSo=; b=CacgaZedEcKH/lvahACNiVM/as2of3lwYnfApYunbtBprjDMG+DrBrpqJKbm0/Etp7 bvT13gOB25Tb5HGap2yjtpxxt0TT/PoPnQ3PS+8CHlwEYz66t7j0KGSw4O7boqTBms49 j2ejJsOduItrDXp2Z3dduNYNjLNw3hkS8qoIsB4UdKuI55QdVBqwZTvrSpH1AtkCsF9x ujnn13mwt8XnVAVbJwJEGtWwlxvYC1c9HhJhKtmK8/1wXhf/BZ+u6KQuWc2DWkCT3V5N 9TibW7A77t5bFn10g8jEGH9Fshw15jJn/QJWMqXLHFMUQgq1futymc+7lXL9G7clwKWE /NFA== X-Gm-Message-State: ALoCoQn6+Uzx9PJ3L1n+EDYYiu7V7YtwzGLoTFPEuJ56IP6anBIBJjht60CTDSRP50M+Pfdojjea X-Received: by 10.112.17.106 with SMTP id n10mr5544546lbd.18.1441654846142; Mon, 07 Sep 2015 12:40:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.225 with SMTP id o1ls577438lag.36.gmail; Mon, 07 Sep 2015 12:40:45 -0700 (PDT) X-Received: by 10.152.5.228 with SMTP id v4mr18499395lav.36.1441654845954; Mon, 07 Sep 2015 12:40:45 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id o10si903367lao.120.2015.09.07.12.40.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 12:40:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbpo4 with SMTP id o4so43225137lbp.2 for ; Mon, 07 Sep 2015 12:40:45 -0700 (PDT) X-Received: by 10.152.9.200 with SMTP id c8mr16987875lab.76.1441654845484; Mon, 07 Sep 2015 12:40:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp548076lbq; Mon, 7 Sep 2015 12:40:44 -0700 (PDT) X-Received: by 10.50.41.67 with SMTP id d3mr31548230igl.57.1441654844333; Mon, 07 Sep 2015 12:40:44 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si1351920pdh.177.2015.09.07.12.40.43; Mon, 07 Sep 2015 12:40:44 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbbIGTkl (ORCPT + 28 others); Mon, 7 Sep 2015 15:40:41 -0400 Received: from mail-qg0-f45.google.com ([209.85.192.45]:35280 "EHLO mail-qg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbbIGTkj (ORCPT ); Mon, 7 Sep 2015 15:40:39 -0400 Received: by qgt47 with SMTP id 47so67583414qgt.2 for ; Mon, 07 Sep 2015 12:40:38 -0700 (PDT) X-Received: by 10.140.201.79 with SMTP id w76mr31218656qha.82.1441654838293; Mon, 07 Sep 2015 12:40:38 -0700 (PDT) Received: from xanadu.home (modemcable065.157-23-96.mc.videotron.ca. [96.23.157.65]) by smtp.gmail.com with ESMTPSA id 139sm413428qhh.32.2015.09.07.12.40.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 12:40:37 -0700 (PDT) Date: Mon, 7 Sep 2015 15:40:36 -0400 (EDT) From: Nicolas Pitre To: Arnd Bergmann cc: linux-arm-kernel@lists.infradead.org, Yongtaek Lee , Russell King , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: fix bug which lowmem size is limited to 760MB In-Reply-To: <1713935.2YV1sNJUyb@wuerfel> Message-ID: References: <20150903091044.GW21084@n2100.arm.linux.org.uk> <1441276233-14566-1-git-send-email-ytk.lee@samsung.com> <1713935.2YV1sNJUyb@wuerfel> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Mon, 7 Sep 2015, Arnd Bergmann wrote: > On Thursday 03 September 2015 21:24:00 Nicolas Pitre wrote: > > If 768MB targets were common place then it could be worth changing the > > default vmalloc size to accommodate this memory size and testing all the > > other targets to make sure no regressions are introduced. But given it > > is easy to change the default via the kernel cmdline, and that you lose > > only 8 MB otherwise, I don't think it is worth the trouble and/or the > > risk. > > Agreed. Well... I think there is a better solution. Instead of shrinking the vmalloc size, we should instead move VMALLOC_END and keep the vmalloc size unchanged. That also makes for nicer address alignment in a subsequent CONFIG_VMSPLIT_3G_OPT patch. ----- >8 ARM: move VMALLOC_END up from 0xff000000 to 0xff800000 There is a 12MB unused region in our memory map between the vmalloc and fixmap areas. This became unused with commit e9da6e9905e6, confirmed with commit 64d3b6a3f480. We also have a 8MB guard area before the vmalloc area. With the default 240MB vmalloc area size, that puts the end of low memory at 0xef800000 which is unfortunate for 768MB machines where 8MB of RAM is lost to himem. Let's move VMALLOC_END to 0xff800000 so the guard area won't chop the top of the 768MB lomem area while keeping the default vmalloc area size unchanged and also preserving a gap between the vmalloc and fixmap areas. Signed-off-by: Nicolas Pitre --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index 4178ebda6e..546a39048e 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt @@ -54,7 +54,7 @@ VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space. located here through iotable_init(). VMALLOC_START is based upon the value of the high_memory variable, and VMALLOC_END - is equal to 0xff000000. + is equal to 0xff800000. PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region. This maps the platforms RAM, and typically diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index f40354198b..348caabb76 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -43,7 +43,7 @@ */ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) -#define VMALLOC_END 0xff000000UL +#define VMALLOC_END 0xff800000UL #define LIBRARY_TEXT_START 0x0c000000