From patchwork Thu Jun 18 15:01:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 6638811 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 08C399F399 for ; Thu, 18 Jun 2015 15:04:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1FE3204A9 for ; Thu, 18 Jun 2015 15:04:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13622204D6 for ; Thu, 18 Jun 2015 15:04:18 +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 1Z5bKW-0005iK-4o; Thu, 18 Jun 2015 15:02:12 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5bK9-0005DP-0r for linux-arm-kernel@lists.infradead.org; Thu, 18 Jun 2015 15:01:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=f4m5eh/hSbWI/Nl5J7YXjblfyA4kuhi7yDbYbJ84s+Y=; b=WvSHE9ZYLLQmW9YazRuhkETW2VlwfcpH4dQqFcUvRYAhHNnj+QAkincpII1NOe6IsuQ7YljLOnLdBevb1gnvwSRChmU/0oOOZdm/6ZvY3UOcpQEG60DMnUR5vK3Z5M5sl4UFF4iXPg/ssq6RjmXH0xtXgwgPZs8EuLMRxsvliJE=; Received: from n2100.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:39774) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Z5bJf-0002mT-36; Thu, 18 Jun 2015 16:01:19 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1Z5bJb-0003ei-RV; Thu, 18 Jun 2015 16:01:15 +0100 Date: Thu, 18 Jun 2015 16:01:15 +0100 From: Russell King - ARM Linux To: Andrew Lunn Subject: Re: ARMADA-XP cpu1 .. cpu3 does not come online Message-ID: <20150618150115.GO7557@n2100.arm.linux.org.uk> References: <20150618123833.GA28005@t440.home> <20150618133607.GB312@lunn.ch> <20150618142233.GL7557@n2100.arm.linux.org.uk> <20150618142835.GF312@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150618142835.GF312@lunn.ch> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150618_080149_481282_41D17394 X-CRM114-Status: GOOD ( 24.25 ) X-Spam-Score: -0.4 (/) Cc: Peter Morrow , Thomas Petazzoni , Gregory Clement , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 On Thu, Jun 18, 2015 at 04:28:35PM +0200, Andrew Lunn wrote: > On Thu, Jun 18, 2015 at 03:22:33PM +0100, Russell King - ARM Linux wrote: > > On Thu, Jun 18, 2015 at 03:36:07PM +0200, Andrew Lunn wrote: > > > > Uncompressing Linux... done, booting the kernel. > > > > [ 0.000000] Booting Linux on physical CPU 0x0 > > > > [ 0.000000] Linux version 4.0.5-00001-g8b87c3c (peter@t440) (gcc version 4.95 > > > > [ 0.000000] CPU: ARMv7 Processor [562f5842] revision 2 (ARMv7), cr=10c5387d > > > > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache > > > > [ 0.000000] Machine model: AXP-TEST-BOARD > > > > [ 0.000000] bootconsole [earlycon0] enabled > > > > [ 0.000000] Truncating RAM at 0x00000000-0xffffffff to -0x2f800000 > > > > > > > > ^^ This is worrying to me, firstly because memory is being truncated down, secondly because my dts file only specifies memory from 0x00000000 to 0xf000000 (see attached dts file) > > > > > > 0x2f800000 suggests you have an old boot loader, with IO at > > > 0xd000,0000. Upgrading to a newer uboot will allow you to use more of > > > the 4G of RAM. It might also fix your SMP issue. > > > > No. The 0x2f800000 comes from having more than 0x2f800000 bytes of memory > > and having highmem disabled. It's got nothing to do with boot loaders at > > all. > > > > The way this works is that sanity_check_meminfo() looks at the base of > > the vmalloc() area. If PAGE_OFFSET + memory_size results in memory above > > the vmalloc() area, and highmem is disabled, sanity_check_meminfo() > > truncates the memory to that limit and reports the above message. > > Hi Russell > > Thanks for the explanation. > > I think at one point x86 used to print a hint about enabling HIGHMEM. > Is it worth adding something similar? Probably yes, but I'm also in favour of changing the Kconfig too - maybe something like this: arch/arm/Kconfig | 6 ++++-- arch/arm/mm/mmu.c | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index add5370eb5e5..e307b36d0e1e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1654,8 +1654,9 @@ config HAVE_GENERIC_RCU_GUP depends on ARM_LPAE config HIGHMEM - bool "High Memory Support" + bool "High Memory Support" if !(CPU_32v6 || CPU_32v7) || EXPERT depends on MMU + default y if CPU_32v6 || CPU_32v7 help The address space of ARM processors is only 4 Gigabytes large and it has to accommodate user address space, kernel address @@ -1671,8 +1672,9 @@ config HIGHMEM If unsure, say n. config HIGHPTE - bool "Allocate 2nd-level pagetables from highmem" + bool "Allocate 2nd-level pagetables from highmem" if EXPERT depends on HIGHMEM + default y config HW_PERF_EVENTS bool "Enable hardware performance counter support for perf events" diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 6ca7d9aa896f..d543e5c7eecc 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1072,6 +1072,7 @@ void __init sanity_check_meminfo(void) int highmem = 0; phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; struct memblock_region *reg; + bool should_use_highmem = false; for_each_memblock(memory, reg) { phys_addr_t block_start = reg->base; @@ -1090,6 +1091,7 @@ void __init sanity_check_meminfo(void) pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n", &block_start, &block_end); memblock_remove(reg->base, reg->size); + should_use_highmem = true; continue; } @@ -1100,6 +1102,7 @@ void __init sanity_check_meminfo(void) &block_start, &block_end, &vmalloc_limit); memblock_remove(vmalloc_limit, overlap_size); block_end = vmalloc_limit; + should_use_highmem = true; } } @@ -1134,6 +1137,9 @@ void __init sanity_check_meminfo(void) } } + if (should_use_highmem) + pr_notice("Consider using a HIGHMEM enabled kernel.\n"); + high_memory = __va(arm_lowmem_limit - 1) + 1; /*