From: Jon Mason Date: Sat, 25 Mar 2006 15:31:19 +0000 (+0100) Subject: [PATCH] x86_64: free_bootmem_node needs __pa in allocate_aperture X-Git-Tag: v2.6.17-rc1~682 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c912c2db2f5c2467ba34e4e655008a14532a3900;p=linux-2.6-omap-h63xx.git [PATCH] x86_64: free_bootmem_node needs __pa in allocate_aperture free_bootmem_node expects a physical address to be passed in, but __alloc_bootmem_node returns a virtual one. That address needs to be translated to physical. Signed-off-by: Jon Mason Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index a0f955b9995..15b45582101 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c @@ -60,7 +60,7 @@ static u32 __init allocate_aperture(void) printk("Cannot allocate aperture memory hole (%p,%uK)\n", p, aper_size>>10); if (p) - free_bootmem_node(nd0, (unsigned long)p, aper_size); + free_bootmem_node(nd0, __pa(p), aper_size); return 0; } printk("Mapping aperture over %d KB of RAM @ %lx\n",