linux-stable/arch/powerpc/mm
Mark Nelson 91eea67c6d powerpc/mm: Track backing pages allocated by vmemmap_populate()
We need to keep track of the backing pages that get allocated by
vmemmap_populate() so that when we use kdump, the dump-capture kernel knows
where these pages are.

We use a simple linked list of structures that contain the physical address
of the backing page and corresponding virtual address to track the backing
pages.
To save space, we just use a pointer to the next struct vmemmap_backing. We
can also do this because we never remove nodes.  We call the pointer "list"
to be compatible with changes made to the crash utility.

vmemmap_populate() is called either at boot-time or on a memory hotplug
operation. We don't have to worry about the boot-time calls because they
will be inherently single-threaded, and for a memory hotplug operation
vmemmap_populate() is called through:
sparse_add_one_section()
            |
            V
kmalloc_section_memmap()
            |
            V
sparse_mem_map_populate()
            |
            V
vmemmap_populate()
and in sparse_add_one_section() we're protected by pgdat_resize_lock().
So, we don't need a spinlock to protect the vmemmap_list.

We allocate space for the vmemmap_backing structs by allocating whole pages
in vmemmap_list_alloc() and then handing out chunks of this to
vmemmap_list_populate().

This means that we waste at most just under one page, but this keeps the code
is simple.

Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-05-06 16:49:27 +10:00
..
40x_mmu.c powerpc/40x: Add support for PPC40x boards with > 512MB SDRAM 2010-02-12 07:54:45 -05:00
44x_mmu.c powerpc/47x: Base ppc476 support 2010-05-05 09:11:10 -04:00
dma-noncoherent.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
fault.c powerpc: Disable interrupts for data breakpoint exceptions 2010-04-07 14:44:38 +10:00
fsl_booke_mmu.c Merge branch 'next' of git://git.secretlab.ca/git/linux-2.6 2009-12-16 13:26:53 -08:00
gup.c powerpc/mm: Allow more flexible layouts for hugepage pagetables 2009-10-30 17:20:58 +11:00
hash_low_32.S powerpc: Use names rather than numbers for SPRGs (v2) 2009-08-20 10:12:27 +10:00
hash_low_64.S
hash_native_64.c powerpc: Convert native_tlbie_lock to raw_spinlock 2010-02-19 14:52:30 +11:00
hash_utils_64.c powerpc/mm: Fix stupid bug in subpge protection handling 2009-12-18 14:55:44 +11:00
highmem.c powerpc/mm: Make k(un)map_atomic out of line 2009-06-26 14:37:25 +10:00
hugetlbpage-hash64.c powerpc/mm: Bring hugepage PTE accessor functions back into sync with normal accessors 2009-10-30 17:21:23 +11: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_32.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_64.c powerpc/mm: Track backing pages allocated by vmemmap_populate() 2010-05-06 16:49:27 +10:00
Makefile powerpc/mm: Split hash MMU specific hugepage code into a new file 2009-10-30 17:20:59 +11:00
mem.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_64.c powerpc: Use helpers for rlimits 2010-01-15 13:20:08 +11:00
mmu_context_hash32.c
mmu_context_hash64.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
mmu_context_nohash.c powerpc/47x: Base ppc476 support 2010-05-05 09:11:10 -04:00
mmu_decl.h powerpc/47x: Base ppc476 support 2010-05-05 09:11:10 -04:00
numa.c nodemask.h: remove macro any_online_node 2010-03-06 11:26:31 -08:00
pgtable.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
pgtable_32.c powerpc: Fix CONFIG_DEBUG_PAGEALLOC on 603/e300 2010-05-06 16:49:26 +10:00
pgtable_64.c powerpc: Fix ioremap_flags() with book3e pte definition 2010-04-07 14:39:47 +10:00
ppc_mmu_32.c wii: use both mem1 and mem2 as ram 2009-12-12 22:24:31 -07:00
slb.c powerpc/pseries: Fix to handle slb resize across migration 2009-09-02 16:19:01 +10:00
slb_low.S powerpc/mm: Fix hang accessing top of vmalloc space 2009-10-14 16:58:36 +11:00
slice.c
stab.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-09-15 09:39:44 -07:00
subpage-prot.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
tlb_hash32.c powerpc/mm: Rework & cleanup page table freeing code path 2009-08-20 10:24:56 +10:00
tlb_hash64.c powerpc: Fix address masking bug in hpte_need_flush() 2010-02-10 13:58:06 +11:00
tlb_low_64e.S fix comment typo leve -> level in powerpc 2010-02-05 12:22:38 +01:00
tlb_nohash.c powerpc: Convert tlbivax_lock to raw_spinlock 2010-02-19 14:52:33 +11:00
tlb_nohash_low.S powerpc/47x: Base ppc476 support 2010-05-05 09:11:10 -04:00