aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-09-11 17:21:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 18:57:30 -0400
commitbc4b4448dba660afc8df3790564320302d9709a1 (patch)
treea4ceb436faa41f8c0146b8f7910ca0e2f69247d9 /mm
parente66f09725771ac5b1b868d6b19eba84e30ffad88 (diff)
mm: move pgtable related functions to right place
pgtable related functions are mostly in pgtable-generic.c. So move remaining functions from memory.c to pgtable-generic.c. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c24
-rw-r--r--mm/pgtable-generic.c24
2 files changed, 24 insertions, 24 deletions
diff --git a/mm/memory.c b/mm/memory.c
index b3c6bf9a398e..c1c6d59b2b03 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -373,30 +373,6 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table)
373#endif /* CONFIG_HAVE_RCU_TABLE_FREE */ 373#endif /* CONFIG_HAVE_RCU_TABLE_FREE */
374 374
375/* 375/*
376 * If a p?d_bad entry is found while walking page tables, report
377 * the error, before resetting entry to p?d_none. Usually (but
378 * very seldom) called out from the p?d_none_or_clear_bad macros.
379 */
380
381void pgd_clear_bad(pgd_t *pgd)
382{
383 pgd_ERROR(*pgd);
384 pgd_clear(pgd);
385}
386
387void pud_clear_bad(pud_t *pud)
388{
389 pud_ERROR(*pud);
390 pud_clear(pud);
391}
392
393void pmd_clear_bad(pmd_t *pmd)
394{
395 pmd_ERROR(*pmd);
396 pmd_clear(pmd);
397}
398
399/*
400 * Note: this doesn't free the actual pages themselves. That 376 * Note: this doesn't free the actual pages themselves. That
401 * has been handled earlier when unmapping all the memory regions. 377 * has been handled earlier when unmapping all the memory regions.
402 */ 378 */
diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c
index e1a6e4fab016..3929a40bd6c0 100644
--- a/mm/pgtable-generic.c
+++ b/mm/pgtable-generic.c
@@ -10,6 +10,30 @@
10#include <asm/tlb.h> 10#include <asm/tlb.h>
11#include <asm-generic/pgtable.h> 11#include <asm-generic/pgtable.h>
12 12
13/*
14 * If a p?d_bad entry is found while walking page tables, report
15 * the error, before resetting entry to p?d_none. Usually (but
16 * very seldom) called out from the p?d_none_or_clear_bad macros.
17 */
18
19void pgd_clear_bad(pgd_t *pgd)
20{
21 pgd_ERROR(*pgd);
22 pgd_clear(pgd);
23}
24
25void pud_clear_bad(pud_t *pud)
26{
27 pud_ERROR(*pud);
28 pud_clear(pud);
29}
30
31void pmd_clear_bad(pmd_t *pmd)
32{
33 pmd_ERROR(*pmd);
34 pmd_clear(pmd);
35}
36
13#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 37#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
14/* 38/*
15 * Only sets the access flags (dirty, accessed), as well as write 39 * Only sets the access flags (dirty, accessed), as well as write