All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86-64: free_bootmem_node needs __pa in allocate_aperture
@ 2006-03-07 17:26 Jon Mason
  2006-03-08  5:33 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Mason @ 2006-03-07 17:26 UTC (permalink / raw)
  To: ak; +Cc: mulix, linux-kernel

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.

Thanks,
Jon

Signed-off-by: Jon Mason <jdmason@us.ibm.com>

diff -r 5647dfd5ed8a arch/x86_64/kernel/aperture.c
--- a/arch/x86_64/kernel/aperture.c	Tue Mar  7 02:47:07 2006
+++ b/arch/x86_64/kernel/aperture.c	Tue Mar  7 10:59:55 2006
@@ -60,7 +60,7 @@
 		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",

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86-64: free_bootmem_node needs __pa in allocate_aperture
  2006-03-07 17:26 [PATCH] x86-64: free_bootmem_node needs __pa in allocate_aperture Jon Mason
@ 2006-03-08  5:33 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-03-08  5:33 UTC (permalink / raw)
  To: Jon Mason; +Cc: mulix, linux-kernel

On Tuesday 07 March 2006 18:26, Jon Mason wrote:
> 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.

Thanks applied. What a nasty trap.

-Andi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-08 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-07 17:26 [PATCH] x86-64: free_bootmem_node needs __pa in allocate_aperture Jon Mason
2006-03-08  5:33 ` Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.