]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7488/1: mm: use 5 bits for swapfile type encoding
authorWill Deacon <will.deacon@arm.com>
Fri, 10 Aug 2012 16:51:19 +0000 (17:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2012 16:59:21 +0000 (09:59 -0700)
commit0b80803ce3abad2533fc03133d1ca1759c8335fd
treec4db7692876b20a3de468e6223d4d174d4bf47bf
parent0d478458e95d8b3e312b96c55d8dc594a2fb90fa
ARM: 7488/1: mm: use 5 bits for swapfile type encoding

commit f5f2025ef3e2cdb593707cbf87378761f17befbe upstream.

Page migration encodes the pfn in the offset field of a swp_entry_t.
For LPAE, we support physical addresses of up to 36 bits (due to
sparsemem limitations with the size of page flags), requiring 24 bits
to represent a pfn. A further 3 bits are used to encode a swp_entry into
a pte, leaving 5 bits for the type field. Furthermore, the core code
defines MAX_SWAPFILES_SHIFT as 5, so the additional type bit does not
get used.

This patch reduces the width of the type field to 5 bits, allowing us
to create up to 31 swapfiles of 64GB each.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/include/asm/pgtable.h