lkml.org 
[lkml]   [2004]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] ppc64: Fix a typo in the code that reserves memory at boot
From
Date
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))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.074 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site