aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 13:33:58 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:33:58 +0100
commit12d6f21eacc21d84a809829543f2fe45c7e37319 (patch)
tree6985f2370ad238fb2a568547a5049751d7c95a69 /arch/x86/mm
parent9a3dc7804e9856668caef41efc54179e61ffccc0 (diff)
x86: do not PSE on CONFIG_DEBUG_PAGEALLOC=y
get more testing of the c_p_a() code done by not turning off PSE on DEBUG_PAGEALLOC. this simplifies the early pagetable setup code, and tests the largepage-splitup code quite heavily. In the end, all the largepages will be split up pretty quickly, so there's no difference to how DEBUG_PAGEALLOC worked before. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/pageattr_32.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/mm/pageattr_32.c b/arch/x86/mm/pageattr_32.c
index 9cf2fea54eb..dd49b16b3a0 100644
--- a/arch/x86/mm/pageattr_32.c
+++ b/arch/x86/mm/pageattr_32.c
@@ -61,13 +61,17 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
static int split_large_page(pte_t *kpte, unsigned long address)
{
pgprot_t ref_prot = pte_pgprot(pte_clrhuge(*kpte));
+ gfp_t gfp_flags = GFP_KERNEL;
unsigned long flags;
unsigned long addr;
pte_t *pbase, *tmp;
struct page *base;
int i, level;
- base = alloc_pages(GFP_KERNEL, 0);
+#ifdef CONFIG_DEBUG_PAGEALLOC
+ gfp_flags = GFP_ATOMIC;
+#endif
+ base = alloc_pages(gfp_flags, 0);
if (!base)
return -ENOMEM;
@@ -219,6 +223,12 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
}
/*
+ * If page allocator is not up yet then do not call c_p_a():
+ */
+ if (!debug_pagealloc_enabled)
+ return;
+
+ /*
* the return value is ignored - the calls cannot fail,
* large pages are disabled at boot time.
*/