diff options
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 5 | ||||
-rw-r--r-- | arch/x86/mm/init.c | 7 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 14 |
3 files changed, 10 insertions, 16 deletions
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 9c30acfadae2..32e5699eadfe 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -265,9 +265,8 @@ int __die(const char *str, struct pt_regs *regs, long err) | |||
265 | #ifdef CONFIG_SMP | 265 | #ifdef CONFIG_SMP |
266 | printk("SMP "); | 266 | printk("SMP "); |
267 | #endif | 267 | #endif |
268 | #ifdef CONFIG_DEBUG_PAGEALLOC | 268 | if (debug_pagealloc_enabled()) |
269 | printk("DEBUG_PAGEALLOC "); | 269 | printk("DEBUG_PAGEALLOC "); |
270 | #endif | ||
271 | #ifdef CONFIG_KASAN | 270 | #ifdef CONFIG_KASAN |
272 | printk("KASAN"); | 271 | printk("KASAN"); |
273 | #endif | 272 | #endif |
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 493f54172b4a..39823fd91396 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -150,13 +150,14 @@ static int page_size_mask; | |||
150 | 150 | ||
151 | static void __init probe_page_size_mask(void) | 151 | static void __init probe_page_size_mask(void) |
152 | { | 152 | { |
153 | #if !defined(CONFIG_DEBUG_PAGEALLOC) && !defined(CONFIG_KMEMCHECK) | 153 | #if !defined(CONFIG_KMEMCHECK) |
154 | /* | 154 | /* |
155 | * For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages. | 155 | * For CONFIG_KMEMCHECK or pagealloc debugging, identity mapping will |
156 | * use small pages. | ||
156 | * This will simplify cpa(), which otherwise needs to support splitting | 157 | * This will simplify cpa(), which otherwise needs to support splitting |
157 | * large pages into small in interrupt context, etc. | 158 | * large pages into small in interrupt context, etc. |
158 | */ | 159 | */ |
159 | if (cpu_has_pse) | 160 | if (cpu_has_pse && !debug_pagealloc_enabled()) |
160 | page_size_mask |= 1 << PG_LEVEL_2M; | 161 | page_size_mask |= 1 << PG_LEVEL_2M; |
161 | #endif | 162 | #endif |
162 | 163 | ||
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 1c37e650acac..e64a4703f8b1 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -106,12 +106,6 @@ static inline unsigned long highmap_end_pfn(void) | |||
106 | 106 | ||
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
110 | # define debug_pagealloc 1 | ||
111 | #else | ||
112 | # define debug_pagealloc 0 | ||
113 | #endif | ||
114 | |||
115 | static inline int | 109 | static inline int |
116 | within(unsigned long addr, unsigned long start, unsigned long end) | 110 | within(unsigned long addr, unsigned long start, unsigned long end) |
117 | { | 111 | { |
@@ -714,10 +708,10 @@ static int split_large_page(struct cpa_data *cpa, pte_t *kpte, | |||
714 | { | 708 | { |
715 | struct page *base; | 709 | struct page *base; |
716 | 710 | ||
717 | if (!debug_pagealloc) | 711 | if (!debug_pagealloc_enabled()) |
718 | spin_unlock(&cpa_lock); | 712 | spin_unlock(&cpa_lock); |
719 | base = alloc_pages(GFP_KERNEL | __GFP_NOTRACK, 0); | 713 | base = alloc_pages(GFP_KERNEL | __GFP_NOTRACK, 0); |
720 | if (!debug_pagealloc) | 714 | if (!debug_pagealloc_enabled()) |
721 | spin_lock(&cpa_lock); | 715 | spin_lock(&cpa_lock); |
722 | if (!base) | 716 | if (!base) |
723 | return -ENOMEM; | 717 | return -ENOMEM; |
@@ -1337,10 +1331,10 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) | |||
1337 | if (cpa->flags & (CPA_ARRAY | CPA_PAGES_ARRAY)) | 1331 | if (cpa->flags & (CPA_ARRAY | CPA_PAGES_ARRAY)) |
1338 | cpa->numpages = 1; | 1332 | cpa->numpages = 1; |
1339 | 1333 | ||
1340 | if (!debug_pagealloc) | 1334 | if (!debug_pagealloc_enabled()) |
1341 | spin_lock(&cpa_lock); | 1335 | spin_lock(&cpa_lock); |
1342 | ret = __change_page_attr(cpa, checkalias); | 1336 | ret = __change_page_attr(cpa, checkalias); |
1343 | if (!debug_pagealloc) | 1337 | if (!debug_pagealloc_enabled()) |
1344 | spin_unlock(&cpa_lock); | 1338 | spin_unlock(&cpa_lock); |
1345 | if (ret) | 1339 | if (ret) |
1346 | return ret; | 1340 | return ret; |