|
@@ -106,12 +106,6 @@ static inline unsigned long highmap_end_pfn(void)
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#ifdef CONFIG_DEBUG_PAGEALLOC
|
|
|
|
-# define debug_pagealloc 1
|
|
|
|
-#else
|
|
|
|
-# define debug_pagealloc 0
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
static inline int
|
|
static inline int
|
|
within(unsigned long addr, unsigned long start, unsigned long end)
|
|
within(unsigned long addr, unsigned long start, unsigned long end)
|
|
{
|
|
{
|
|
@@ -714,10 +708,10 @@ static int split_large_page(struct cpa_data *cpa, pte_t *kpte,
|
|
{
|
|
{
|
|
struct page *base;
|
|
struct page *base;
|
|
|
|
|
|
- if (!debug_pagealloc)
|
|
|
|
|
|
+ if (!debug_pagealloc_enabled())
|
|
spin_unlock(&cpa_lock);
|
|
spin_unlock(&cpa_lock);
|
|
base = alloc_pages(GFP_KERNEL | __GFP_NOTRACK, 0);
|
|
base = alloc_pages(GFP_KERNEL | __GFP_NOTRACK, 0);
|
|
- if (!debug_pagealloc)
|
|
|
|
|
|
+ if (!debug_pagealloc_enabled())
|
|
spin_lock(&cpa_lock);
|
|
spin_lock(&cpa_lock);
|
|
if (!base)
|
|
if (!base)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
@@ -1337,10 +1331,10 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
|
|
if (cpa->flags & (CPA_ARRAY | CPA_PAGES_ARRAY))
|
|
if (cpa->flags & (CPA_ARRAY | CPA_PAGES_ARRAY))
|
|
cpa->numpages = 1;
|
|
cpa->numpages = 1;
|
|
|
|
|
|
- if (!debug_pagealloc)
|
|
|
|
|
|
+ if (!debug_pagealloc_enabled())
|
|
spin_lock(&cpa_lock);
|
|
spin_lock(&cpa_lock);
|
|
ret = __change_page_attr(cpa, checkalias);
|
|
ret = __change_page_attr(cpa, checkalias);
|
|
- if (!debug_pagealloc)
|
|
|
|
|
|
+ if (!debug_pagealloc_enabled())
|
|
spin_unlock(&cpa_lock);
|
|
spin_unlock(&cpa_lock);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|