]> err.no Git - linux-2.6/commitdiff
[PATCH] x86_64: free_bootmem_node needs __pa in allocate_aperture
authorJon Mason <jdmason@us.ibm.com>
Sat, 25 Mar 2006 15:31:19 +0000 (16:31 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 17:10:57 +0000 (09:10 -0800)
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 <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/aperture.c

index a0f955b9995fcfc1698365d697cddf462133c0d4..15b45582101fd7d85f9a854be833aa0254551db9 100644 (file)
@@ -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",