]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thp: remove assumptions on pgtable_t type
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Fri, 28 Sep 2012 00:19:20 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Oct 2012 05:03:17 +0000 (15:03 +1000)
commit398ae508d680ccc390d453caeed4c792b6eda23a
treeccdb39491b10bf496787e52f5637672332509d17
parent021defeee4919ac858b797fcc328e114d9aecd24
thp: remove assumptions on pgtable_t type

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: Gerald 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: Andrew Morton <akpm@linux-foundation.org>
include/asm-generic/pgtable.h
include/linux/huge_mm.h
mm/huge_memory.c
mm/pgtable-generic.c