• G
    thp: remove assumptions on pgtable_t type · e3ebcf64
    Gerald Schaefer 提交于
    The thp page table pre-allocation code currently assumes that pgtable_t is
    of type "struct page *".  This may not be true for all architectures, so
    this patch removes that assumption by replacing the functions
    prepare_pmd_huge_pte() and get_pmd_huge_pte() with two new functions that
    can be defined architecture-specific.
    
    It also removes two VM_BUG_ON checks for page_count() and page_mapcount()
    operating on a pgtable_t.  Apart from the VM_BUG_ON removal, there will be
    no functional change introduced by this patch.
    Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Hillf Danton <dhillf@gmail.com>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    e3ebcf64
huge_mm.h 6.3 KB