The patch titled virtual-memmap-on-sparsemem-v3-map-and-unmap fix has been added to the -mm tree. Its filename is virtual-memmap-on-sparsemem-v3-map-and-unmap-fix.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: virtual-memmap-on-sparsemem-v3-map-and-unmap fix From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> This removes implicit default actions in map_generic_kernel() call. Also changes comments in vmalloc.h Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Andy Whitcroft <apw@xxxxxxxxxxxx> Cc: Dave Hansen <haveblue@xxxxxxxxxx> Cc: Martin Bligh <mbligh@xxxxxxxxxx> Cc: "Luck, Tony" <tony.luck@xxxxxxxxx> Cc: Christoph Lameter <clameter@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/vmalloc.h | 8 ++++--- mm/vmalloc.c | 39 +++++++++++--------------------------- 2 files changed, 17 insertions(+), 30 deletions(-) diff -puN include/linux/vmalloc.h~virtual-memmap-on-sparsemem-v3-map-and-unmap-fix include/linux/vmalloc.h --- a/include/linux/vmalloc.h~virtual-memmap-on-sparsemem-v3-map-and-unmap-fix +++ a/include/linux/vmalloc.h @@ -81,6 +81,9 @@ extern struct vm_struct *vmlist; * not managed by standard vmap calls. * The caller has to be responsible to manage his own virtual address space. * + * what you have to do in pud/pmd/pte allocation is allocate page and + * populate that entry. + * * Bootstrap consideration: * you can pass pud/pmd/pte alloc functions to map_generic_kernel(). * So you can use bootmem function or something to alloc page tables if @@ -88,13 +91,12 @@ extern struct vm_struct *vmlist; */ struct gen_map_kern_ops { - /* must be defined */ + /* all pointers must be filled */ int (*k_pte_set)(pte_t *pte, unsigned long addr, void *data); - int (*k_pte_clear)(pte_t *pte, unsigned long addr, void *data); - /* optional */ int (*k_pud_alloc)(pgd_t *pgd, unsigned long addr, void *data); int (*k_pmd_alloc)(pud_t *pud, unsigned long addr, void *data); int (*k_pte_alloc)(pmd_t *pmd, unsigned long addr, void *data); + int (*k_pte_clear)(pte_t *pte, unsigned long addr, void *data); }; /* diff -puN mm/vmalloc.c~virtual-memmap-on-sparsemem-v3-map-and-unmap-fix mm/vmalloc.c --- a/mm/vmalloc.c~virtual-memmap-on-sparsemem-v3-map-and-unmap-fix +++ a/mm/vmalloc.c @@ -764,15 +764,10 @@ static int map_generic_pte_range(pmd_t * int ret = 0; unsigned long next; if (!pmd_present(*pmd)) { - if (ops->k_pte_alloc) { - ret = ops->k_pte_alloc(pmd, addr, data); - if (ret) - return ret; - } else { - pte = pte_alloc_kernel(pmd, addr); - if (!pte) - return -ENOMEM; - } + BUG_ON(!ops->k_pte_alloc); + ret = ops->k_pte_alloc(pmd, addr, data); + if (ret) + return ret; } pte = pte_offset_kernel(pmd, addr); @@ -796,15 +791,10 @@ static int map_generic_pmd_range(pud_t * int ret; if (pud_none(*pud)) { - if (ops->k_pmd_alloc) { - ret = ops->k_pmd_alloc(pud, addr, data); - if (ret) - return ret; - } else { - pmd = pmd_alloc(&init_mm, pud, addr); - if (!pmd) - return -ENOMEM; - } + BUG_ON(!ops->k_pmd_alloc); + ret = ops->k_pmd_alloc(pud, addr, data); + if (ret) + return ret; } pmd = pmd_offset(pud, addr); do { @@ -824,15 +814,10 @@ static int map_generic_pud_range(pgd_t * unsigned long next; int ret; if (pgd_none(*pgd)) { - if (ops->k_pud_alloc) { - ret = ops->k_pud_alloc(pgd, addr, data); - if (ret) - return ret; - } else { - pud = pud_alloc(&init_mm, pgd, addr); - if (!pud) - return -ENOMEM; - } + BUG_ON(!ops->k_pud_alloc); + ret = ops->k_pud_alloc(pgd, addr, data); + if (ret) + return ret; } pud = pud_offset(pgd, addr); do { _ Patches currently in -mm which might be from kamezawa.hiroyu@xxxxxxxxxxxxxx are origin.patch virtual-memmap-on-sparsemem-v3-map-and-unmap.patch virtual-memmap-on-sparsemem-v3-map-and-unmap-fix.patch virtual-memmap-on-sparsemem-v3-generic-virtual.patch virtual-memmap-on-sparsemem-v3-static-virtual.patch virtual-memmap-on-sparsemem-v3-static-virtual-update.patch virtual-memmap-on-sparsemem-v3-ia64-support.patch virtual-memmap-on-sparsemem-v3-ia64-support-update.patch sched-avoid-taking-rq-lock-in-wake_priority_sleeper.patch sched-remove-staggering-of-load-balancing.patch sched-disable-interrupts-for-locking-in-load_balance.patch sched-extract-load-calculation-from-rebalance_tick.patch sched-move-idle-status-calculation-into-rebalance_tick.patch sched-use-softirq-for-load-balancing.patch sched-call-tasklet-less-frequently.patch sched-add-option-to-serialize-load-balancing.patch sched-add-option-to-serialize-load-balancing-fix.patch mm-only-sched-add-a-few-scheduler-event-counters.patch reiser4-hardirq-include-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html