Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp221168imm; Thu, 10 May 2018 19:08:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoteN5EFzC3jltLRbTp0N6aqzpnmcxL87KCayXNqQa+Wo2kJU+KPCrpajAfWNsQD5JrH9zo X-Received: by 2002:a17:902:680e:: with SMTP id h14-v6mr3501528plk.90.1526004496132; Thu, 10 May 2018 19:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526004496; cv=none; d=google.com; s=arc-20160816; b=fEP6nliYzck/8eD6bZpAoVVJBncovtWoYI45pSEpCHI0GXHSyvAk1sytmdoWTSjF13 soK6qEZdwTp4Q2ikLW2HBtJe4dnAD4WYrvv+8zSyH2akcyORsfStgYrW5geXNO2PWJGq cy4rBaaNEJF7lE+r28Dy+j06VpV8TG/jNvehdDI2ZU6/HVos2ISPA5Bnu4d2pjUUSvtD Dnk6VnItyALFhWgyF/USekAbhH640LrLnXzLWRAHRaj1+vDpqQ/TmdUIYE99hib28QtK yQHoXnUhhRs1peFe8/PyYvudt2dhxqnw+fRAp6htxRUPNuQom6/VaPGfRt2/Ka1doLDH uTzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ZUxNH4S1rd0FuJDFlceW7tRz9aafXAe9+aIIZ/YQ3uw=; b=rSImMaZ9WwRRZwXuFcSjf7JztnD/BBFWVEEAIC2JaVCpUoR1TVWMKrDKoCfsicacgG VkyNkgg/p1KluAjNCKhkKDI+UP2dXXu09BukdF+mNbRAmIS1Zv/vUTBf9xR3egyncwvZ clpXyA5Mg2ib14exNuktKY+hxhcEowPUvFicEoodHJJ+7wmVSj7QR7reZGI0BBtCwb5K z9vUYmTKSBmPImDYb0hpISsURsXa28oVVhybWYw8t7HkvPdiLhVSWVEmgs8D/TwgqTAS L421Q+C8bSl3SrE+hgPQwcPkQ1Mb6S2tzEZ6CPjsyFsZSD+uTK91jeh/fbA5c6hw7a1z uDVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14-v6si2019456pli.250.2018.05.10.19.07.59; Thu, 10 May 2018 19:08:16 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751964AbeEKCGj (ORCPT + 99 others); Thu, 10 May 2018 22:06:39 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:53924 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750798AbeEKCGi (ORCPT ); Thu, 10 May 2018 22:06:38 -0400 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1fGxS6-0006i8-00; Fri, 11 May 2018 02:06:34 +0000 Date: Thu, 10 May 2018 22:06:34 -0400 From: Rich Felker To: Rob Herring Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org Subject: Re: early alloc change broke sh Message-ID: <20180511020634.GQ1392@brightrain.aerifal.cx> References: <20180511000128.GA23149@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180511000128.GA23149@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 10, 2018 at 08:01:28PM -0400, Rich Felker wrote: > Since commit 0fa1c579349fdd90173381712ad78aa99c09d38b (of/fdt: use > memblock_virt_alloc for early alloc), attempting to boot on sh (j2, > nommu) fails with OOM: > > [ 0.000000] bootmem alloc of 7836 bytes failed! > [ 0.000000] Kernel panic - not syncing: Out of memory > > I suspect there are significant differences in memblock_virt_alloc and > memblock_alloc (perhaps specific to nommu?). It looks like microblaze > was also affected: > > http://lkml.iu.edu/hypermail/linux/kernel/1801.1/02200.html > > I'll continue looking for a solution but I wanted to let you know > right away in case you might know what's wrong and have a fix. It > would be nice if we could get a fix for this regression in 4.17 since > multiple archs are broken. The problem seems to be that a working memblock_virt_alloc depends on: #if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) Otherwise, it's a thin wrapper around __alloc_bootmem, which is not equivalent to the old memblock_alloc call. Rich