Re: mmotm 2009-04-21-15-00 uploaded

From: Andrew Morton
Date: Tue Apr 21 2009 - 21:59:24 EST


On Tue, 21 Apr 2009 18:30:57 -0700 Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:

> akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > The mm-of-the-moment snapshot 2009-04-21-15-00 has been uploaded to
> >
> > http://userweb.kernel.org/~akpm/mmotm/
> >
> > and will soon be available at
> >
> > git://git.zen-sources.org/zen/mmotm.git
> >
> > It contains the following patches against 2.6.30-rc2:
>
>
> 2 of 10 i386 builds ended like:
>
>
> CC arch/x86/kernel/asm-offsets.s
> In file included from include/linux/suspend.h:8,
> from arch/x86/kernel/asm-offsets_32.c:11,
> from arch/x86/kernel/asm-offsets.c:2:
> include/linux/mm.h: In function 'get_pte':
> include/linux/mm.h:907: error: implicit declaration of function 'kmap_atomic_pte'
> make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1
> make[1]: *** [prepare0] Error 2
> make: *** [sub-make] Error 2
>
>
>
> config attached.

Caused by ksm-add-get_pte-helper-function-fetching-pte-for-va.patch.

hm, this will end badly. Let's uninline it.

--- a/include/linux/mm.h~ksm-add-get_pte-helper-function-fetching-pte-for-va-fix
+++ a/include/linux/mm.h
@@ -883,30 +883,7 @@ extern void unregister_shrinker(struct s
int vma_wants_writenotify(struct vm_area_struct *vma);

extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl);
-
-static inline pte_t *get_pte(struct mm_struct *mm, unsigned long addr)
-{
- pgd_t *pgd;
- pud_t *pud;
- pmd_t *pmd;
- pte_t *ptep = NULL;
-
- pgd = pgd_offset(mm, addr);
- if (!pgd_present(*pgd))
- goto out;
-
- pud = pud_offset(pgd, addr);
- if (!pud_present(*pud))
- goto out;
-
- pmd = pmd_offset(pud, addr);
- if (!pmd_present(*pmd))
- goto out;
-
- ptep = pte_offset_map(pmd, addr);
-out:
- return ptep;
-}
+extern pte_t *get_pte(struct mm_struct *mm, unsigned long addr);

#ifdef __PAGETABLE_PUD_FOLDED
static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
diff -puN mm/util.c~ksm-add-get_pte-helper-function-fetching-pte-for-va-fix mm/util.c
--- a/mm/util.c~ksm-add-get_pte-helper-function-fetching-pte-for-va-fix
+++ a/mm/util.c
@@ -1,4 +1,5 @@
#include <linux/mm.h>
+#include <linux/highmem.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/module.h>
@@ -264,6 +265,31 @@ int __attribute__((weak)) get_user_pages
}
EXPORT_SYMBOL_GPL(get_user_pages_fast);

+pte_t *get_pte(struct mm_struct *mm, unsigned long addr)
+{
+ pgd_t *pgd;
+ pud_t *pud;
+ pmd_t *pmd;
+ pte_t *ptep = NULL;
+
+ pgd = pgd_offset(mm, addr);
+ if (!pgd_present(*pgd))
+ goto out;
+
+ pud = pud_offset(pgd, addr);
+ if (!pud_present(*pud))
+ goto out;
+
+ pmd = pmd_offset(pud, addr);
+ if (!pmd_present(*pmd))
+ goto out;
+
+ ptep = pte_offset_map(pmd, addr);
+out:
+ return ptep;
+}
+EXPORT_SYMBOL_GPL(get_pte);
+
/* Tracepoints definitions. */
EXPORT_TRACEPOINT_SYMBOL(kmalloc);
EXPORT_TRACEPOINT_SYMBOL(kmem_cache_alloc);
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/