From patchwork Tue Dec 23 14:22:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 42599 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B667026C92 for ; Tue, 23 Dec 2014 14:25:36 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf4096540lbd.2 for ; Tue, 23 Dec 2014 06:25:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:message-id:date:user-agent :mime-version:to:subject:references:in-reply-to:cc:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:content-type:content-transfer-encoding:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list; bh=dRX6n2kxzQzIwiklAKS4ioIJ26kG3GE2r+YRAFngjnc=; b=Phitvv9mpqqDOEXcUjoeorYaT7oapYIB01t+iy3I7syrU1sMGdEFmKJbl+xRWLVZXp MAnqK/Hl/OAjPRXhlmn0mz5h0ikIDpUFoQ4JMrvxCNIUpLpyYr5gCoxFLG5UNS/UNmNA Yqbdl2UqqtQbGPXI/vLuWMal9SoXJAAidPJc0guGHETuXYTbQFvfVeQ51J5bfvJRJ6k6 4hSghe3MWR0tGjqzcgJpNE57SKNLuLP1yLwdN+bqvv0dD5nIS3pPsDi8Rj5Bs6s+Knmc Szxfa0jMJfaqJNYESSAClWjSWNiBts3awI24YbXkXVsG751FQc67BKACvK7TxIAssFvG umCQ== X-Gm-Message-State: ALoCoQlGG0by8UueJnM6oOal402sOIL9ue8p0U3Efmm58Gy7go8pLA82/vtdkxazPs0BA0D5o4Hw X-Received: by 10.180.82.34 with SMTP id f2mr2850479wiy.1.1419344735678; Tue, 23 Dec 2014 06:25:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.99 with SMTP id s3ls1444516lag.79.gmail; Tue, 23 Dec 2014 06:25:35 -0800 (PST) X-Received: by 10.112.129.195 with SMTP id ny3mr28537840lbb.10.1419344735522; Tue, 23 Dec 2014 06:25:35 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id tz3si21957284lbb.66.2014.12.23.06.25.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Dec 2014 06:25:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id 10so5435442lbg.19 for ; Tue, 23 Dec 2014 06:25:35 -0800 (PST) X-Received: by 10.112.235.137 with SMTP id um9mr28151345lbc.41.1419344735278; Tue, 23 Dec 2014 06:25:35 -0800 (PST) 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.142.69 with SMTP id ru5csp1345513lbb; Tue, 23 Dec 2014 06:25:34 -0800 (PST) X-Received: by 10.70.128.80 with SMTP id nm16mr44543596pdb.1.1419344733232; Tue, 23 Dec 2014 06:25:33 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ow1si29650519pbb.118.2014.12.23.06.25.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 06:25:33 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1Y3QN0-0001OW-1W; Tue, 23 Dec 2014 14:23:30 +0000 Received: from mail-lb0-f178.google.com ([209.85.217.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y3QMv-0001M2-MY for linux-arm-kernel@lists.infradead.org; Tue, 23 Dec 2014 14:23:26 +0000 Received: by mail-lb0-f178.google.com with SMTP id f15so6030793lbj.37 for ; Tue, 23 Dec 2014 06:23:02 -0800 (PST) X-Received: by 10.152.18.225 with SMTP id z1mr28263367lad.0.1419344582223; Tue, 23 Dec 2014 06:23:02 -0800 (PST) Received: from [172.22.39.20] ([195.238.92.128]) by mx.google.com with ESMTPSA id zo3sm5897148lbb.10.2014.12.23.06.23.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 06:23:01 -0800 (PST) From: "Grygorii.Strashko@linaro.org" Message-ID: <54997AC2.1040507@linaro.org> Date: Tue, 23 Dec 2014 16:22:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Murali Karicheri , =?windows-1252?Q?Uwe_Kleine?= =?windows-1252?Q?-K=F6nig?= , Kees Cook Subject: Re: kernel.org - master not booting on keystone (ARM v7 Cortex A15 SoC) EVMs References: <549490D6.3090804@ti.com> <20141219211816.GH10857@pengutronix.de> <5494B932.6060602@ti.com> <20141221102925.GJ10857@pengutronix.de> <54983304.3080302@ti.com> In-Reply-To: <54983304.3080302@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141223_062325_937605_033FB40D X-CRM114-Status: GOOD ( 17.07 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.178 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.217.178 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Tyler Baker , Laura Abbott , linux-arm-kernel , Nicolas Pitre 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@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.174 as permitted sender) smtp.mail=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 On 12/22/2014 05:04 PM, Murali Karicheri wrote: > On 12/21/2014 05:29 AM, Uwe Kleine-König wrote: >> Hello, >> >> I cannot say anything here, but maybe the people being involved in >> 1e6b48116a950 can. I added them to Cc and didn't trim the mail for them. > Uwe, > > Thanks for copying the commit owners. Looking forward for a response > from them. > > Murali >> >> Best regards >> Uwe >> >> On Fri, Dec 19, 2014 at 06:48:02PM -0500, Murali Karicheri wrote: >>> On 12/19/2014 04:25 PM, Tyler Baker wrote: >>>> Hello, >>>> >>>> On 19 December 2014 at 13:18, Uwe Kleine-König >>>> wrote: >>>>> Hello, >>>>> >>>>> On Fri, Dec 19, 2014 at 03:55:50PM -0500, Murali Karicheri wrote: >>>>>> I have pulled the latest master from >>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and >>>>>> tried booting on keystone k2hk and k2e EVM. The boot hangs with >>>>>> following log. Has anyone seen this? Keystone is an ARM v7 cortex >>>>>> A15 SMP platform. I am assuming master branch is broken for ARM v7 >>>>>> and someone is working to address this. v3.18 booted up fine on my >>>>>> EVM. >>>>>> >>>>>> Any idea? >>>>> You forgot to attach the log?! So no, I don't have any idea. Did you >>>>> bisect? >>> >>> This was my first git bisect work. git bisect showed me below commit >>> as bad commit. But it is pretty old commit. I tried reverting the >>> commit and my board booted up fine. The boot log attached below. I >>> did following until I got the bad commit. v3.18 also worked fine. >>> >>> git bisect start >>> git bisect good >>> git bisect bad >>> >>> I build and test. If boots fine, I did git bisect good and if not, >>> git bisect bad until I got the bad commit. Can someone comment if my >>> bisect steps look sane? If so, what is wrong with the below commit? >>> Ours is a LPAE SoC. >>> >>> commit 1e6b48116a95046ec51f3d40f83aff8b006674d7 >>> Author: Kees Cook >>> Date: Thu Apr 3 17:28:11 2014 -0700 >>> >>> ARM: mm: allow non-text sections to be non-executable >>> >>> Adds CONFIG_ARM_KERNMEM_PERMS to separate the kernel memory regions >>> into section-sized areas that can have different permisions. >>> Performs >>> the NX permission changes during free_initmem, so that init >>> memory can be >>> reclaimed. >>> >>> This uses section size instead of PMD size to reduce memory lost to >>> padding on non-LPAE systems. >>> >>> Based on work by Brad Spengler, Larry Bassel, and Laura Abbott. >>> >>> Signed-off-by: Kees Cook >>> Tested-by: Laura Abbott >>> Acked-by: Nicolas Pitre >>> Looks like kernel_x_start, kernel_x_end are calculated wrongly in LPAE case. kernel_x_start == 0x0000 0000 kernel_x_end == 0x0080 0000 but should be: kernel_x_start == 0x0000 0008 0000 0000 kernel_x_end == 0x0000 0008 0080 0000 Below diff restores boot for me: diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index cda7c40..4e6ef89 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1329,8 +1329,8 @@ static void __init kmap_init(void) static void __init map_lowmem(void) { struct memblock_region *reg; - unsigned long kernel_x_start = round_down(__pa(_stext), SECTION_SIZE); - unsigned long kernel_x_end = round_up(__pa(__init_end), SECTION_SIZE); + phys_addr_t kernel_x_start = round_down(__pa(_stext), SECTION_SIZE); + phys_addr_t kernel_x_end = round_up(__pa(__init_end), SECTION_SIZE); /* Map all the lowmem memory banks. */ for_each_memblock(memory, reg) {