Commit ea208f64 authored by Linus Walleij's avatar Linus Walleij Committed by Russell King

ARM: 6144/1: TCM memory bug freeing bug

This fixes a bug in mm/init.c when freeing the TCM compile memory,
this was being referred to as a char * which is incorrect: this
will dereference the pointer and feed in the value at the location
instead of the address to it. Change it to a plain char and use
&(char) to reference it.
Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 138de1c4
...@@ -678,10 +678,10 @@ void __init mem_init(void) ...@@ -678,10 +678,10 @@ void __init mem_init(void)
void free_initmem(void) void free_initmem(void)
{ {
#ifdef CONFIG_HAVE_TCM #ifdef CONFIG_HAVE_TCM
extern char *__tcm_start, *__tcm_end; extern char __tcm_start, __tcm_end;
totalram_pages += free_area(__phys_to_pfn(__pa(__tcm_start)), totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
__phys_to_pfn(__pa(__tcm_end)), __phys_to_pfn(__pa(&__tcm_end)),
"TCM link"); "TCM link");
#endif #endif
......
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