From: akpm@linux-foundation.org Subject: [patch 062/108] mm/hugetlb/migration: use set_huge_pte_at instead of set_pte_at Date: Thu, 06 Jul 2017 15:38:41 -0700 Message-ID: <20170706223841.xDnur0hCp%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:36292 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbdGFWim (ORCPT ); Thu, 6 Jul 2017 18:38:42 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: akpm@linux-foundation.org, aneesh.kumar@linux.vnet.ibm.com, benh@kernel.crashing.org, khandual@linux.vnet.ibm.com, kravetz@us.ibm.com, mm-commits@vger.kernel.org, mpe@ellerman.id.au, n-horiguchi@ah.jp.nec.com, torvalds@linux-foundation.org From: "Aneesh Kumar K.V" Subject: mm/hugetlb/migration: use set_huge_pte_at instead of set_pte_at Patch series "HugeTLB migration support for PPC64", v2. This patch (of 9): The right interface to use to set a hugetlb pte entry is set_huge_pte_at. Use that instead of set_pte_at. Link: http://lkml.kernel.org/r/1494926612-23928-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Naoya Horiguchi Cc: Anshuman Khandual Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Mike Kravetz Signed-off-by: Andrew Morton --- mm/migrate.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff -puN mm/migrate.c~mm-hugetlb-migration-use-set_huge_pte_at-instead-of-set_pte_at mm/migrate.c --- a/mm/migrate.c~mm-hugetlb-migration-use-set_huge_pte_at-instead-of-set_pte_at +++ a/mm/migrate.c @@ -227,25 +227,26 @@ static bool remove_migration_pte(struct if (is_write_migration_entry(entry)) pte = maybe_mkwrite(pte, vma); + flush_dcache_page(new); #ifdef CONFIG_HUGETLB_PAGE if (PageHuge(new)) { pte = pte_mkhuge(pte); pte = arch_make_huge_pte(pte, vma, new, 0); - } -#endif - flush_dcache_page(new); - set_pte_at(vma->vm_mm, pvmw.address, pvmw.pte, pte);