summaryrefslogtreecommitdiff
path: root/include/asm-x86/pgtable.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-03-17 16:37:14 -0700
committerIngo Molnar <mingo@elte.hu>2008-04-24 23:57:31 +0200
commit85958b465c2e0de315575b1d3d7e7c2ce7126880 (patch)
treec1d6a062bf74b8e172757f4f4259ac567043b8a1 /include/asm-x86/pgtable.h
parent68db065c845bd9d0eb96946ab104b4c82d0ae9da (diff)
downloadlwn-85958b465c2e0de315575b1d3d7e7c2ce7126880.tar.gz
lwn-85958b465c2e0de315575b1d3d7e7c2ce7126880.zip
x86: unify pgd ctor/dtor
All pagetables need fundamentally the same setup and destruction, so just use the same code for everything. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/pgtable.h')
-rw-r--r--include/asm-x86/pgtable.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index e61075e70a54..b8a08bd7bd48 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -438,6 +438,22 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm,
pte_update(mm, addr, ptep);
}
+/*
+ * clone_pgd_range(pgd_t *dst, pgd_t *src, int count);
+ *
+ * dst - pointer to pgd range anwhere on a pgd page
+ * src - ""
+ * count - the number of pgds to copy.
+ *
+ * dst and src can be on the same page, but the range must not overlap,
+ * and must not cross a page boundary.
+ */
+static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
+{
+ memcpy(dst, src, count * sizeof(pgd_t));
+}
+
+
#include <asm-generic/pgtable.h>
#endif /* __ASSEMBLY__ */