Re: [PATCH 2/2] x86_64: make early_node_mem return align address

From: Andi Kleen
Date: Tue Jan 29 2008 - 04:35:24 EST


On Tuesday 29 January 2008 10:05, Yinghai Lu wrote:
> [PATCH 2/2] x86_64: make early_node_mem return align address
>
> boot oops when system get 64g or 128g installed

Probably it should just use reserve_early(). Does this patch work?

The alignment change is needed at some point too, but only to
relax the alignment to not force all early allocations to be page
padded.

-Andi

---

Use early reservation for early node data

Signed-off-by: Andi Kleen <ak@xxxxxxx>

Index: linux/arch/x86/mm/numa_64.c
===================================================================
--- linux.orig/arch/x86/mm/numa_64.c
+++ linux/arch/x86/mm/numa_64.c
@@ -169,8 +169,10 @@ static void * __init early_node_mem(int
unsigned long mem = find_e820_area(start, end, size);
void *ptr;

- if (mem != -1L)
+ if (mem != -1L) {
+ reserve_early(mem, mem + size);
return __va(mem);
+ }
ptr = __alloc_bootmem_nopanic(size,
SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS));
if (ptr == NULL) {


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