linux/arch/powerpc/mm
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
..
40x_mmu.c
44x_mmu.c
dma-noncoherent.c powerpc: Implement dma_mmap_coherent() 2011-03-30 10:44:00 +11:00
fault.c
fsl_booke_mmu.c
gup.c thp: alter compound get_page/put_page 2011-01-13 17:32:39 -08:00
hash_low_32.S
hash_low_64.S powerpc: Free up some CPU feature bits by moving out MMU-related features 2011-04-27 14:18:52 +10:00
hash_native_64.c powerpc: Use new CPU feature bit to select 2.06 tlbie 2011-05-04 15:19:26 +10:00
hash_utils_64.c powerpc: Free up some CPU feature bits by moving out MMU-related features 2011-04-27 14:18:52 +10:00
highmem.c
hugetlbpage-hash64.c
hugetlbpage.c powerpc: Free up some CPU feature bits by moving out MMU-related features 2011-04-27 14:18:52 +10:00
init_32.c powerpc: Force page alignment for initrd reserved memory 2011-06-09 16:52:38 +10:00
init_64.c powerpc: Force page alignment for initrd reserved memory 2011-06-09 16:52:38 +10:00
Makefile
mem.c powerpc: Force page alignment for initrd reserved memory 2011-06-09 16:52:38 +10:00
mmap_64.c
mmu_context_hash32.c
mmu_context_hash64.c powerpc: Fix compile with icwsx support 2011-05-06 13:18:34 +10:00
mmu_context_nohash.c powerpc: Add TLB size detection for TYPE_3E MMUs 2011-04-27 13:02:10 +10:00
mmu_decl.h
numa.c powerpc: Convert old cpumask API into new one 2011-05-04 15:22:59 +10:00
pgtable_32.c powerpc: Remove ioremap_flags 2011-05-19 14:30:43 +10:00
pgtable_64.c powerpc: Remove ioremap_flags 2011-05-19 14:30:43 +10:00
pgtable.c mm, powerpc: move the RCU page-table freeing into generic code 2011-05-25 08:39:16 -07:00
ppc_mmu_32.c
slb_low.S powerpc: Free up some CPU feature bits by moving out MMU-related features 2011-04-27 14:18:52 +10:00
slb.c powerpc: Free up some CPU feature bits by moving out MMU-related features 2011-04-27 14:18:52 +10:00
slice.c
stab.c powerpc: Free up some CPU feature bits by moving out MMU-related features 2011-04-27 14:18:52 +10:00
subpage-prot.c
tlb_hash32.c mm, powerpc: move the RCU page-table freeing into generic code 2011-05-25 08:39:16 -07:00
tlb_hash64.c mm, powerpc: move the RCU page-table freeing into generic code 2011-05-25 08:39:16 -07:00
tlb_low_64e.S Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6 2011-04-07 11:14:49 -07:00
tlb_nohash_low.S powerpc/476: Workaround for PLB6 hang 2011-02-02 06:59:02 -05:00
tlb_nohash.c mm, powerpc: move the RCU page-table freeing into generic code 2011-05-25 08:39:16 -07:00