summaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2010-09-20 11:06:18 +0000
committerMike Frysinger <vapier@gentoo.org>2010-10-22 04:02:01 -0400
commit46284cd6bfc99a38165c41651477ec6497aa38ec (patch)
treed25645dbfdeaba7d65092b99ec0ca58225fc9813 /arch/blackfin
parent05bbec38dbafa60583be8347dea88919d48cc733 (diff)
downloadblackbird-op-linux-46284cd6bfc99a38165c41651477ec6497aa38ec.tar.gz
blackbird-op-linux-46284cd6bfc99a38165c41651477ec6497aa38ec.zip
Blackfin: merge kernel init memory back into main memory region
If the kernel's init section is merged back into the main memory region during boot (which it should since that is how we've laid out the kernel linker map), we want to make sure that these aren't counted as independent regions. Otherwise, if a large mapping is attempted which starts in the init region and extends into the main memory region, the access_ok func will deny it. This leads to weird messages during runtime like "unable to map xxx library" from the ldso but upon running the application again, everything works fine. So if the address of the end of the init region is the same as the start of the main memory region, simply enlarge the memory region to include the init region. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mm/init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index bb4e8fff4b55..f8435cd36c7c 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -158,5 +158,8 @@ void __init_refok free_initmem(void)
free_init_pages("unused kernel memory",
(unsigned long)(&__init_begin),
(unsigned long)(&__init_end));
+
+ if (memory_start == (unsigned long)(&__init_end))
+ memory_start = (unsigned long)(&__init_begin);
#endif
}
OpenPOWER on IntegriCloud