aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index dce282f65700..f53cfc7f963d 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -687,7 +687,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
687{ 687{
688 struct cpa_data alias_cpa; 688 struct cpa_data alias_cpa;
689 unsigned long laddr = (unsigned long)__va(cpa->pfn << PAGE_SHIFT); 689 unsigned long laddr = (unsigned long)__va(cpa->pfn << PAGE_SHIFT);
690 unsigned long vaddr, remapped; 690 unsigned long vaddr;
691 int ret; 691 int ret;
692 692
693 if (cpa->pfn >= max_pfn_mapped) 693 if (cpa->pfn >= max_pfn_mapped)
@@ -745,24 +745,6 @@ static int cpa_process_alias(struct cpa_data *cpa)
745 } 745 }
746#endif 746#endif
747 747
748 /*
749 * If the PMD page was partially used for per-cpu remapping,
750 * the recycled area needs to be split and modified. Because
751 * the area is always proper subset of a PMD page
752 * cpa->numpages is guaranteed to be 1 for these areas, so
753 * there's no need to loop over and check for further remaps.
754 */
755 remapped = (unsigned long)pcpu_lpage_remapped((void *)laddr);
756 if (remapped) {
757 WARN_ON(cpa->numpages > 1);
758 alias_cpa = *cpa;
759 alias_cpa.vaddr = &remapped;
760 alias_cpa.flags &= ~(CPA_PAGES_ARRAY | CPA_ARRAY);
761 ret = __change_page_attr_set_clr(&alias_cpa, 0);
762 if (ret)
763 return ret;
764 }
765
766 return 0; 748 return 0;
767} 749}
768 750