From: Magnus Hjorth <mh@omnisys.se>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Linuxppc-embedded@ozlabs.org
Subject: [PATCH] ppc4xx: mmu_mapin_ram bugfix for booting with mem<16 MB
Date: Sat, 27 Oct 2007 10:35:16 +0200 [thread overview]
Message-ID: <1193474116.5412.14.camel@magnus-desktop> (raw)
In-Reply-To: <fa686aa40710261254r105530d4u2e95d96948030ed7@mail.gmail.com>
From: Magnus Hjorth <mh@omnisys.se>
This patch (for 2.6.23.1) fixes an unsigned arithmetic bug causing the
kernel to hang when booting with less than 16 MB of memory on ppc4xx.
Signed-off-by: Magnus Hjorth <mh@omnisys.se>
---
OK, trying to do this by the book now...
--- linux-2.6.23.1/arch/ppc/mm/4xx_mmu.c.orig 2007-10-27 10:14:42.000000000 +0200
+++ linux-2.6.23.1/arch/ppc/mm/4xx_mmu.c 2007-10-27 10:15:34.000000000 +0200
@@ -105,7 +105,7 @@ unsigned long __init mmu_mapin_ram(void)
return s;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) {
+ while (s + LARGE_PAGE_SIZE_16M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
@@ -120,7 +120,7 @@ unsigned long __init mmu_mapin_ram(void)
s += LARGE_PAGE_SIZE_16M;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) {
+ while (s + LARGE_PAGE_SIZE_4M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
prev parent reply other threads:[~2007-10-27 8:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 20:01 problems to boot 2.6.23 kernel on XILINX ppc with 8Mbytes of RAM manu
2007-10-25 7:00 ` Magnus Hjorth
2007-10-26 18:43 ` manu
2007-10-26 19:54 ` Grant Likely
2007-10-27 8:35 ` Magnus Hjorth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1193474116.5412.14.camel@magnus-desktop \
--to=mh@omnisys.se \
--cc=Linuxppc-embedded@ozlabs.org \
--cc=grant.likely@secretlab.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).