WSL2-Linux-Kernel/arch/powerpc
Benjamin Herrenschmidt 307cfe7153 powerpc: Force page alignment for initrd reserved memory
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>
2011-06-09 16:52:38 +10:00
..
boot dtc/powerpc: remove obsolete .gitignore entries 2011-06-08 18:51:18 -06:00
configs cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
include/asm Merge remote branch 'kumar/merge' into merge 2011-06-09 14:46:32 +10:00
kernel powerpc: Force page alignment for initrd reserved memory 2011-06-09 16:52:38 +10:00
kvm Merge branch 'kvm-updates/2.6.40' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2011-05-23 08:42:08 -07:00
lib Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-05-20 13:28:01 -07:00
math-emu powerpc/85xx: Fix SPE float to integer conversion failure 2011-03-15 13:48:15 -05:00
mm powerpc: Force page alignment for initrd reserved memory 2011-06-09 16:52:38 +10:00
oprofile powerpc/oprofile: Handle events that raise an exception without overflowing 2011-05-26 13:38:57 +10:00
platforms powerpc/pmac: Don't register pmac PIC syscore ops when HW not present 2011-05-31 20:30:20 +09:00
sysdev powerpc/85xx: fix race bug of calling request_irq after enable elbc interrupts 2011-06-03 00:09:09 -05:00
xmon powerpc: Remove call sites of MSG_ALL_BUT_SELF 2011-05-19 14:30:46 +10:00
Kconfig arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} 2011-05-26 17:12:38 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile powerpc: Fix typo in uImage target 2010-08-24 15:26:32 +10:00
relocs_check.pl