Commit bc63de7c authored by Chris Metcalf's avatar Chris Metcalf

arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd.

Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
parent c45c1cd7
...@@ -953,7 +953,7 @@ static void __init load_hv_initrd(void) ...@@ -953,7 +953,7 @@ static void __init load_hv_initrd(void)
if (rc != stat.size) { if (rc != stat.size) {
pr_err("Error reading %d bytes from hvfs file '%s': %d\n", pr_err("Error reading %d bytes from hvfs file '%s': %d\n",
stat.size, initramfs_file, rc); stat.size, initramfs_file, rc);
free_bootmem((unsigned long) initrd, stat.size); free_initrd_mem((unsigned long) initrd, stat.size);
return; return;
} }
initrd_start = (unsigned long) initrd; initrd_start = (unsigned long) initrd;
...@@ -962,7 +962,7 @@ static void __init load_hv_initrd(void) ...@@ -962,7 +962,7 @@ static void __init load_hv_initrd(void)
void __init free_initrd_mem(unsigned long begin, unsigned long end) void __init free_initrd_mem(unsigned long begin, unsigned long end)
{ {
free_bootmem(begin, end - begin); free_bootmem(__pa(begin), end - begin);
} }
static void __init validate_hv(void) static void __init validate_hv(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment