From patchwork Fri Oct 31 23:23:28 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hollis Blanchard X-Patchwork-Id: 6757 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id A1FC7DDF82 for ; Sat, 1 Nov 2008 10:23:45 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by ozlabs.org (Postfix) with ESMTP id B0F87DDDFF for ; Sat, 1 Nov 2008 10:23:30 +1100 (EST) Received: by yw-out-2324.google.com with SMTP id 5so614820ywh.39 for ; Fri, 31 Oct 2008 16:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=YrZtohF/49IcoPbiXVzn3vnmvpSiw5uNTTUNn8NAdmU=; b=QDZtO8dc1ylZzaOYWaCEFzMjJosOZGxeu6apmdLZ6hgsSy8gDmufX80lYq4axLKop8 NSz2Nux3OPvQm9I2KZl7Zf6dZ6NLmSFDcond5nifXQ/Xk/Y23WRKnheCUb8i7RfQBA3p YYxmpDTaM7QIp78JkQ+sGxGXZ88zkvpx1Rh4M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=GlZXrEaJpeaPrcj2gZtd7O+XNaYPWm1j+lbjUdUCXNU8F3nlTCkY4x3Q8h0pgNerU+ 6ezWqlpAHtgS55YLXbcy8ZRG2UnvfhxiBOJGa2s0gCzoLy/sEZTQsOv8aSEZlrWIFbg3 6fvl9N3LkdHYY7s41+ZE14qRm9uYsGdqK9HxA= Received: by 10.64.7.5 with SMTP id 5mr13984699qbg.42.1225495408461; Fri, 31 Oct 2008 16:23:28 -0700 (PDT) Received: by 10.65.141.6 with HTTP; Fri, 31 Oct 2008 16:23:28 -0700 (PDT) Message-ID: Date: Fri, 31 Oct 2008 18:23:28 -0500 From: "Hollis Blanchard" To: "Christian Ehrhardt" Subject: Re: [PATCH 1/2] powerpc: add 16K/64K pages support for the 44x PPC32 architectures. In-Reply-To: <48FF3889.2030304@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Disposition: inline References: <1224123753-20907-1-git-send-email-yanok@emcraft.com> <1224123753-20907-2-git-send-email-yanok@emcraft.com> <48FF3889.2030304@linux.vnet.ibm.com> X-Google-Sender-Auth: b641fa6677e9828f Cc: Hollis Blanchard , dzu@denx.de, linuxppc-dev@ozlabs.org, pvr@emcraft.com, Ilya Yanok , Wolfgang Denk X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org On Wed, Oct 22, 2008 at 9:28 AM, Christian Ehrhardt wrote: > Hi Ilya, > I just tried your patch on my 440 board because it would help us in our > environment. > Unfortunately I run into a bug on early boot (mark_bootmem). > > A log can be found in this mail, this is the bug when running with 64k page > size. > I tried this with and without your 2/2 265k patch and also with page size > configured to 16k, the error is the same in all cases. > > I used an earlier version of your patch in the past and it worked fine. > Applying this old patch causes the same problem. > Therefore I expect that there was some other code changed that breaks with > page size != 4k. This patch seems to solve the problem for me, but I have to run and haven't yet worked out if it's the right fix. Looks like the breakage may have been accidentally introduced by Johannes Weiner on Jul 24 (post 2.6.26). FWIW, the boards Christian and I are hitting the problem on are Sequoias with 256MB of RAM. cuImage is reporting only 0xffff000 bytes of RAM though, which may be exacerbating the situation. -Hollis diff --git a/mm/bootmem.c b/mm/bootmem.c --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -300,7 +300,7 @@ static int __init mark_bootmem(unsigned unsigned long max; if (pos < bdata->node_min_pfn || - pos >= bdata->node_low_pfn) { + pos > bdata->node_low_pfn) { BUG_ON(pos != start); continue; } @@ -399,7 +399,7 @@ int __init reserve_bootmem(unsigned long unsigned long start, end; start = PFN_DOWN(addr); - end = PFN_UP(addr + size); + end = PFN_DOWN(addr + size); return mark_bootmem(start, end, 1, flags); }