From patchwork Fri May 31 14:24:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 17396 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f199.google.com (mail-gg0-f199.google.com [209.85.161.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 80B5325CAB for ; Fri, 31 May 2013 14:24:55 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id q3sf1599998gge.10 for ; Fri, 31 May 2013 07:24:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=o7pfAIjc9/0FbiIOmglU0iBgE6zG+XhGl2zE21HoQPE=; b=Umbni2uSGKhQ0L3UsBA1XNnZ8OkjloIdf3hGXqzf9WkziYuY5BXlnvRZsWcMXp/HID NMgheX0OjDbhxgVZdbWoerHvSu2yBoDrPZ5XRRnXjSoqQgzlEoxohGWoNfCCSwScZP+Y qeIl2O9BPteM7cYZzBUERMjNS7rkUlKnt9TIIiIKG684bCeeDRcHp/xAqW+6e8+ssLp7 WUFzNA2bYPv9uMls3Zv6eJRh5qorNEwyu05ScYzMWeT1zr9T9OcmVp8XyrquXK/FXOU9 S8Tp0LWKZaNRQxzDwfXHG8aSloT7D+VM4R5AdGltpLPW9l+mtUm9Vz1KFjO77efAPuS4 BDGg== X-Received: by 10.58.186.236 with SMTP id fn12mr4356345vec.0.1370010295238; Fri, 31 May 2013 07:24:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.110 with SMTP id h14ls918604qey.88.gmail; Fri, 31 May 2013 07:24:55 -0700 (PDT) X-Received: by 10.52.156.65 with SMTP id wc1mr9002688vdb.10.1370010295015; Fri, 31 May 2013 07:24:55 -0700 (PDT) Received: from mail-vb0-x231.google.com (mail-vb0-x231.google.com [2607:f8b0:400c:c02::231]) by mx.google.com with ESMTPS id ad7si28560521vdc.68.2013.05.31.07.24.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 07:24:55 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::231; Received: by mail-vb0-f49.google.com with SMTP id q13so1068056vbe.22 for ; Fri, 31 May 2013 07:24:54 -0700 (PDT) X-Received: by 10.52.34.114 with SMTP id y18mr8843620vdi.56.1370010294901; Fri, 31 May 2013 07:24:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.229.199 with SMTP id jj7csp52308vcb; Fri, 31 May 2013 07:24:54 -0700 (PDT) X-Received: by 10.180.21.193 with SMTP id x1mr3492315wie.31.1370010293880; Fri, 31 May 2013 07:24:53 -0700 (PDT) Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [2a00:1450:400c:c03::22e]) by mx.google.com with ESMTPS id g17si1967825wiv.38.2013.05.31.07.24.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 07:24:53 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22e is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::22e; Received: by mail-we0-f174.google.com with SMTP id x50so1343072wes.33 for ; Fri, 31 May 2013 07:24:53 -0700 (PDT) X-Received: by 10.180.208.81 with SMTP id mc17mr3589458wic.35.1370010293460; Fri, 31 May 2013 07:24:53 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPSA id fx7sm4261208wic.11.2013.05.31.07.24.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 07:24:41 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, srinidhi.kasagar@stericsson.com, Lee Jones Subject: [PATCH 2/2] ARM: ux500: Enable HIGHMEM in the u8540 defconfig Date: Fri, 31 May 2013 15:24:32 +0100 Message-Id: <1370010272-25520-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1370010272-25520-1-git-send-email-lee.jones@linaro.org> References: <1370010272-25520-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmh/uxf4CZgw/qs3ZoIqc1P3iruL2MZMrBbIAnkaHUwghUeZHHlqF4zmkYC0KTf0H5aGL2Y X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In order to utilise all of the memory located on ux500 based devices we have to enable HIGHMEM. Without it the kernel truncates memory down to what's left after the PAGE_OFFSET has been applied, which doesn't leave an awful lot, especially if we're running large rootfs' such as full Linux desktop distributions or Android. Signed-off-by: Lee Jones --- arch/arm/configs/u8500_defconfig | 1 + drivers/of/fdt.c | 52 +++++++------------------------------- 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index 2d322d2..38d633a 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig @@ -1,3 +1,4 @@ +CONFIG_HIGHMEM=y # CONFIG_SWAP is not set CONFIG_SYSVIPC=y CONFIG_NO_HZ=y diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 5439925..808be06 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -43,7 +43,7 @@ void *of_fdt_get_property(struct boot_param_header *blob, do { u32 tag = be32_to_cpup((__be32 *)p); - u32 sz, noff, i; + u32 sz, noff; const char *nstr; p += 4; @@ -66,10 +66,6 @@ void *of_fdt_get_property(struct boot_param_header *blob, if (strcmp(name, nstr) == 0) { if (size) *size = sz; - - print_hex_dump(KERN_ERR, "node: ", DUMP_PREFIX_ADDRESS, - 16, 1, (__be32 *)node, p - node, true); - return (void *)p; } p += sz; @@ -624,68 +620,38 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname, __be32 *reg, *endp; unsigned long l; - printk("LEE: ******************************************* \n"); - printk("LEE: ******************************************* \n"); - printk("LEE: ******************************************* \n"); - printk("LEE: ******************************************* \n"); - printk("LEE: ******************************************* \n"); - printk("LEE: ******************************************* \n"); - printk("LEE: ******************************************* \n"); - /* We are scanning "memory" nodes only */ if (type == NULL) { - printk("LEE: 1\n"); /* * The longtrail doesn't have a device_type on the * /memory node, so look for the node called /memory@0. */ - if (depth != 1 || strcmp(uname, "memory@0") != 0) { - printk("LEE: 2\n"); + if (depth != 1 || strcmp(uname, "memory@0") != 0) return 0; - } - } else if (strcmp(type, "memory") != 0) { - printk("LEE: 3\n"); + } else if (strcmp(type, "memory") != 0) return 0; - } reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l); - if (reg == NULL) { + if (reg == NULL) reg = of_get_flat_dt_prop(node, "reg", &l); - printk("LEE: This is correct \n"); - } - if (reg == NULL) { - printk("LEE: 4\n"); - return 0; - } - - printk("LEE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \n"); - printk("LEE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \n"); - printk("LEE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \n"); - printk("LEE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \n"); - printk("LEE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \n"); - printk("LEE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \n"); - printk("LEE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \n"); + if (reg == NULL) + return 0; endp = reg + (l / sizeof(__be32)); - printk("LEE: reg: 0x%p\n", reg); - - printk("memory scan node %s, reg size %ld, data: %x %x %x %x,\n", + pr_debug("memory scan node %s, reg size %ld, data: %x %x %x %x,\n", uname, l, reg[0], reg[1], reg[2], reg[3]); - printk("extras: %x %x %x %x,\n", reg[4], reg[5], reg[6], reg[7]); - while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { u64 base, size; base = dt_mem_next_cell(dt_root_addr_cells, ®); size = dt_mem_next_cell(dt_root_size_cells, ®); - printk(" - %llx , %llx\n", (unsigned long long)base, - (unsigned long long)size); - if (size == 0) continue; + pr_debug(" - %llx , %llx\n", (unsigned long long)base, + (unsigned long long)size); early_init_dt_add_memory_arch(base, size); }