From patchwork Wed Feb 22 17:48:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 142513 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1FD52B6FA1 for ; Thu, 23 Feb 2012 04:48:31 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754013Ab2BVRsa (ORCPT ); Wed, 22 Feb 2012 12:48:30 -0500 Received: from mail-pw0-f46.google.com ([209.85.160.46]:55821 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754007Ab2BVRs3 (ORCPT ); Wed, 22 Feb 2012 12:48:29 -0500 Received: by pbcun15 with SMTP id un15so402564pbc.19 for ; Wed, 22 Feb 2012 09:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gwQDcZ/V+RXmgaVoWHH648YVbcvzom1GDyUOv5+noVM=; b=CmW6TtgqeTQqPnDtzBZev3LSnRNCkHzUpWbgV8dXdYX7c/I0H1PAam3bHBZ2jDCNDb BtUNaJLtpixb0K+V7JVd3hoWp7bBqoFDb6DK57dJppUjuCxbgNipDH8/d3bGNBqXv6jI Q0a92js58pGc2vvA+SJ/2Xg1keTV8UCPuN9wI= Received: by 10.68.189.39 with SMTP id gf7mr70188734pbc.142.1329932908884; Wed, 22 Feb 2012 09:48:28 -0800 (PST) Received: from google.com (wtj.mtv.corp.google.com [172.18.96.96]) by mx.google.com with ESMTPS id q8sm31090026pbi.1.2012.02.22.09.48.27 (version=SSLv3 cipher=OTHER); Wed, 22 Feb 2012 09:48:27 -0800 (PST) Date: Wed, 22 Feb 2012 09:48:25 -0800 From: Tejun Heo To: Meelis Roos Cc: Grant Likely , Rob Herring , sparclinux@vger.kernel.org, Linux Kernel list , sam@ravnborg.org, "David S. Miller" Subject: Re: OF-related boot crash in 3.3.0-rc3-00188-g3ec1e88 Message-ID: <20120222174825.GA32694@google.com> References: <20120213080618.GA11077@ponder.secretlab.ca> <20120213214623.GJ11077@ponder.secretlab.ca> <20120220170603.GC7836@mtj.dyndns.org> <20120221010537.GA15898@dhcp-172-17-108-109.mtv.corp.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org On Wed, Feb 22, 2012 at 02:36:13AM +0200, Meelis Roos wrote: > > Meelis, can you please apply the following patch before & after the > > offending commit, boot with "memblock=debug" added as kernel param and > > post the boot log? The patch will generate some offset warnings after > > the commit but should work fine. > > Before the commit (v3.2-rc3-75-g0ee332c): memblock1.gz (attached) > After the commit (v3.2-rc3-76-g7bd0b0f): memblock2.gz (attached) Can you please try the following patch? If it still fails to boot, please attach the failing log. Thank you. --- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/mm/memblock.c b/mm/memblock.c index 77b5f22..99f2855 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -99,9 +99,6 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t start, phys_addr_t this_start, this_end, cand; u64 i; - /* align @size to avoid excessive fragmentation on reserved array */ - size = round_up(size, align); - /* pump up @end */ if (end == MEMBLOCK_ALLOC_ACCESSIBLE) end = memblock.current_limit; @@ -731,6 +728,9 @@ static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size, { phys_addr_t found; + /* align @size to avoid excessive fragmentation on reserved array */ + size = round_up(size, align); + found = memblock_find_in_range_node(0, max_addr, size, align, nid); if (found && !memblock_reserve(found, size)) return found;