linux/arch/mips/mm
David Daney 43064c0c8e MIPS: Handle initmem in systems with kernel not in add_memory_region() mem
This patch addresses a couple of related problems:

1) The kernel may reside in physical memory outside of the ranges set
   by plat_mem_setup().  If this is the case, init mem cannot be
   reused as it resides outside of the range of pages that the kernel
   memory allocators control.

2) initrd images might be loaded in physical memory outside of the
   ranges set by plat_mem_setup().  The memory likewise cannot be
   reused.  The patch doesn't handle this specific case, but the
   infrastructure is useful for future patches that do.

The crux of the problem is that there are memory regions that need be
memory_present(), but that cannot be free_bootmem() at the time of
arch_mem_init().  We create a new type of memory (BOOT_MEM_INIT_RAM)
for use with add_memory_region().  Then arch_mem_init() adds the init
mem with this type if the init mem is not already covered by existing
ranges.

When memory is being freed into the bootmem allocator, we skip the
BOOT_MEM_INIT_RAM ranges so they are not clobbered, but we do signal
them as memory_present().  This way when they are later freed, the
necessary memory manager structures have initialized and the Sparse
allocater is prevented from crashing.

The Octeon specific code that handled this case is removed, because
the new general purpose code handles the case.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1988/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-12-07 22:03:45 +00:00
..
Makefile MIPS: Add fast get_user_pages 2011-12-07 22:03:45 +00:00
c-octeon.c MIPS: cache: Provide cache flush operations for XFS 2011-10-20 15:00:18 +01:00
c-r3k.c MIPS: cache: Provide cache flush operations for XFS 2011-10-20 15:00:18 +01:00
c-r4k.c MIPS: cache: Provide cache flush operations for XFS 2011-10-20 15:00:18 +01:00
c-tx39.c MIPS: cache: Provide cache flush operations for XFS 2011-10-20 15:00:18 +01:00
cache.c MIPS: cache: Provide cache flush operations for XFS 2011-10-20 15:00:18 +01:00
cerr-sb1.c MIPS: Sibyte: Use hweight8 instead of counting bits 2009-12-17 01:57:16 +00:00
cex-gen.S
cex-oct.S MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon. 2009-01-11 09:57:21 +00:00
cex-sb1.S Fix common misspellings 2011-03-31 11:26:23 -03:00
dma-default.c MIPS: HIGHMEM DMA on noncoherent MIPS32 processors 2011-07-25 17:26:52 +01:00
extable.c MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
fault.c perf: Remove the nmi parameter from the swevent and overflow interface 2011-07-01 11:06:35 +02:00
gup.c MIPS: Add fast get_user_pages 2011-12-07 22:03:45 +00:00
highmem.c mm: fix race in kunmap_atomic() 2010-10-27 18:03:05 -07:00
hugetlbpage.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
init.c MIPS: Handle initmem in systems with kernel not in add_memory_region() mem 2011-12-07 22:03:45 +00:00
ioremap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mmap.c MIPS: Trivial style cleanups in mmap.c 2011-09-17 02:37:04 +02:00
page.c MIPS: Move arch/mips/mm/uasm.h to arch/mips/include/asm/uasm.h 2010-02-27 12:53:19 +01:00
pgtable-32.c MIPS: Limit fixrange_init() to the FIXMAP region 2011-07-25 17:26:54 +01:00
pgtable-64.c MIPS: Limit fixrange_init() to the FIXMAP region 2011-07-25 17:26:54 +01:00
sc-ip22.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
sc-mips.c MIPS: Fix build errors in sc-mips.c 2010-12-17 19:44:35 +00:00
sc-r5k.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
sc-rm7k.c MIPS: RM7000: Symbol should be static 2010-10-04 18:33:54 +01:00
tlb-r3k.c MIPS: Remove __init from add_wired_entry() 2011-10-24 23:34:23 +01:00
tlb-r4k.c MIPS: Remove __init from add_wired_entry() 2011-10-24 23:34:23 +01:00
tlb-r8k.c update David Miller's old email address 2011-04-06 06:19:38 -07:00
tlbex-fault.S
tlbex.c MIPS: No branches in delay slots for huge pages in handle_tlbl 2011-09-21 17:54:07 +02:00
uasm.c MIPS: Use WARN() in uasm for better diagnostics. 2011-01-18 19:30:24 +01:00