summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2010-05-26 07:37:57 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-05 11:22:34 -0700
commitdf5fe92090f87b7bbaa3c849f1f085f157acdecf (patch)
tree3ccf599a290a18e9171dd9845bf47e01e737d356 /arch
parentf4faf6a2dfda56e75b5949a437bc30a92ab6272a (diff)
ARM: 6144/1: TCM memory bug freeing bug
commit ea208f646c8fb91c39c852e952fc911e1ad045ab upstream. 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: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mm/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 0ed29bfeba1c..55d07c8b4270 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -712,10 +712,10 @@ void __init mem_init(void)
void free_initmem(void)
{
#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)),
- __phys_to_pfn(__pa(__tcm_end)),
+ totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
+ __phys_to_pfn(__pa(&__tcm_end)),
"TCM link");
#endif