bootmem: fix wrong call parameter for free_bootmem()

It is strange that alloc_bootmem() returns a virtual address and
free_bootmem() requires a physical address.  Anyway, free_bootmem()'s
first parameter should be physical address.

There are some call sites for free_bootmem() with virtual address.  So fix
them.

[[email protected]: improve free_bootmem() and free_bootmem_pate() documentation]
Signed-off-by: Joonsoo Kim <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: FUJITA Tomonori <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Joonsoo Kim 2012-12-11 16:03:10 -08:00 • committed by Linus Torvalds
commit 81df9bff26
5 changed files with 16 additions and 16 deletions

View file

@ -161,6 +161,6 @@ EXPORT_SYMBOL(free_cpumask_var);
*/
void __init free_bootmem_cpumask_var(cpumask_var_t mask)
{
free_bootmem((unsigned long)mask, cpumask_size());
free_bootmem(__pa(mask), cpumask_size());
}
#endif