* [PATCH] ppc64: Fix a typo in the code that reserves memory at boot
@ 2004-10-16 4:55 Benjamin Herrenschmidt
2004-10-16 5:02 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2004-10-16 4:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list, linuxppc64-dev
Hi !
The code that marks memory regions as "reserved" early during boot
has a typo (doing incorrect rounding of the top address) which can
cause some areas to not be properly reserved. That may explain some
cases of initrd corruption reported recently.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
===== arch/ppc64/kernel/prom_init.c 1.2 vs edited =====
--- 1.2/arch/ppc64/kernel/prom_init.c 2004-09-27 19:12:49 +10:00
+++ edited/arch/ppc64/kernel/prom_init.c 2004-10-16 14:53:28 +10:00
@@ -595,7 +595,7 @@
* dumb and just copy this entire array to the boot params
*/
base = _ALIGN_DOWN(base, PAGE_SIZE);
- top = _ALIGN_DOWN(top, PAGE_SIZE);
+ top = _ALIGN_UP(top, PAGE_SIZE);
size = top - base;
if (cnt >= (MEM_RESERVE_MAP_SIZE - 1))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ppc64: Fix a typo in the code that reserves memory at boot
2004-10-16 4:55 [PATCH] ppc64: Fix a typo in the code that reserves memory at boot Benjamin Herrenschmidt
@ 2004-10-16 5:02 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2004-10-16 5:02 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list, linuxppc64-dev
On Sat, 2004-10-16 at 14:55, Benjamin Herrenschmidt wrote:
> Hi !
>
> The code that marks memory regions as "reserved" early during boot
> has a typo (doing incorrect rounding of the top address) which can
> cause some areas to not be properly reserved. That may explain some
> cases of initrd corruption reported recently.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Ok, ignore it and take Anton's one instead.
Ben.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-16 5:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-16 4:55 [PATCH] ppc64: Fix a typo in the code that reserves memory at boot Benjamin Herrenschmidt
2004-10-16 5:02 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®