aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/pageattr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 091934e1d0d9..25b1d35c76cb 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -542,13 +542,14 @@ out_unlock:
542 return do_split; 542 return do_split;
543} 543}
544 544
545int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase) 545static int
546__split_large_page(pte_t *kpte, unsigned long address, struct page *base)
546{ 547{
548 pte_t *pbase = (pte_t *)page_address(base);
547 unsigned long pfn, pfninc = 1; 549 unsigned long pfn, pfninc = 1;
548 unsigned int i, level; 550 unsigned int i, level;
549 pte_t *tmp; 551 pte_t *tmp;
550 pgprot_t ref_prot; 552 pgprot_t ref_prot;
551 struct page *base = virt_to_page(pbase);
552 553
553 spin_lock(&pgd_lock); 554 spin_lock(&pgd_lock);
554 /* 555 /*
@@ -633,7 +634,6 @@ int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase)
633 634
634static int split_large_page(pte_t *kpte, unsigned long address) 635static int split_large_page(pte_t *kpte, unsigned long address)
635{ 636{
636 pte_t *pbase;
637 struct page *base; 637 struct page *base;
638 638
639 if (!debug_pagealloc) 639 if (!debug_pagealloc)
@@ -644,8 +644,7 @@ static int split_large_page(pte_t *kpte, unsigned long address)
644 if (!base) 644 if (!base)
645 return -ENOMEM; 645 return -ENOMEM;
646 646
647 pbase = (pte_t *)page_address(base); 647 if (__split_large_page(kpte, address, base))
648 if (__split_large_page(kpte, address, pbase))
649 __free_page(base); 648 __free_page(base);
650 649
651 return 0; 650 return 0;