https://github.com/torvalds/linux
Revision 307cfe715344e15eda12dad3bb14f794115ca823 authored by Benjamin Herrenschmidt on 09 June 2011, 06:52:38 UTC, committed by Benjamin Herrenschmidt on 09 June 2011, 06:52:38 UTC
When using 64K pages with a separate cpio rootfs, U-Boot will align
the rootfs on a 4K page boundary. When the memory is reserved, and
subsequent early memblock_alloc is called, it will allocate memory
between the 64K page alignment and reserved memory. When the reserved
memory is subsequently freed, it is done so by pages, causing the
early memblock_alloc requests to be re-used, which in my case, caused
the device-tree to be clobbered.

This patch forces the reserved memory for initrd to be kernel page
aligned, and will move the device tree if it overlaps with the range
extension of initrd. This patch will also consolidate the identical
function free_initrd_mem() from mm/init_32.c, init_64.c to mm/mem.c,
and adds the same range extension when freeing initrd. free_initrd_mem()
is also moved to the __init section.

Many thanks to Milton Miller for his input on this patch.

[BenH: Fixed build without CONFIG_BLK_DEV_INITRD]

Signed-off-by: Dave Carroll <dcarroll@astekcorp.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent d660474
History
Tip revision: 307cfe715344e15eda12dad3bb14f794115ca823 authored by Benjamin Herrenschmidt on 09 June 2011, 06:52:38 UTC
powerpc: Force page alignment for initrd reserved memory
Tip revision: 307cfe7
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 966 bytes
.mailmap -rw-r--r-- 4.2 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.3 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 189.6 KB
Makefile -rw-r--r-- 52.6 KB
README -rw-r--r-- 17.1 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top