• Punit Agrawal's avatar
    mm/hugetlb: allow architectures to override huge_pte_clear() · 9386fac3
    Punit Agrawal authored
    When unmapping a hugepage range, huge_pte_clear() is used to clear the
    page table entries that are marked as not present.  huge_pte_clear()
    internally just ends up calling pte_clear() which does not correctly
    deal with hugepages consisting of contiguous page table entries.
    
    Add a size argument to address this issue and allow architectures to
    override huge_pte_clear() by wrapping it in a #ifndef block.
    
    Update s390 implementation with the size parameter as well.
    
    Note that the change only affects huge_pte_clear() - the other generic
    hugetlb functions don't need any change.
    
    Link: http://lkml.kernel.org/r/20170522162555.4313-1-punit.agrawal@arm.comSigned-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
    Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>	[s390 bits]
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Cc: Steve Capper <steve.capper@arm.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    9386fac3
hugetlb.h 806 Bytes