Thread (8 messages) 8 messages, 2 authors, 2008-01-10

Re: [PATCH] [POWERPC] Fix handling of memreserve if the range lands in highmem

flat view

From: Kumar Gala <hidden>
Date: 2008-01-09 19:27:50

On Jan 9, 2008, at 12:53 PM, Scott Wood wrote:
On Wed, Jan 09, 2008 at 11:28:30AM -0600, Kumar Gala wrote:
quoted
	/* reserve the sections we're already using */
-	for (i = 0; i < lmb.reserved.cnt; i++)
-		reserve_bootmem(lmb.reserved.region[i].base,
-				lmb_size_bytes(&lmb.reserved, i));
+	for (i = 0; i < lmb.reserved.cnt; i++) {
+		unsigned long addr = lmb.reserved.region[i].base +
+				     lmb_size_bytes(&lmb.reserved, i) - 1;
+		if (addr < total_lowmem)
+			reserve_bootmem(lmb.reserved.region[i].base,
+					lmb_size_bytes(&lmb.reserved, i));
+	}
It looks like if the reserved area straddles the highmem boundary, it'll
only reserve the highmem portion.
Yeah, I thought about that.  I'm wondering if we should warn about this.. its seems like a bad thing to do.

- k
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help