s390/mm: simplify page table alloc/free code
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 14 Aug 2015 12:58:50 +0000 (14:58 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 19 Aug 2015 08:41:19 +0000 (10:41 +0200)
commit78fb907626dccfeee6f4213c649606e9ba49c6bc
treebc164fa538b3d8b28a7c772a4e3f7fbde067ec24
parent3d8258e4ab5166ca702b2828c99a5fa7dcb40a0c
s390/mm: simplify page table alloc/free code

With the removal of the dynamic reallocation of page tables for
KVM (see git commit 0b46e0a3ec0d7a04af6a091354f1b5e1b952d70a)
the page table allocation / freeing code can be simplified.

The page table free code can now use the alloc_pgste bit in the
mm context to decide if a page table is 2K or 4K, there is no mix
of different sized page tables anymore. This eliminates the need
to use "page->_mapcount == 0" to check for 4K page table.

Use the lower two bits in page->_mapcount to indicate which
2K fragments of the 4K page are in use.

As 31-bit support is gone, remove the two defines ALLOC_ORDER
and FRAG_MASK and use the constants directly where appropriate.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgtable.c
This page took 0.025603 seconds and 5 git commands to generate.