]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arm: set the page table freeing ceiling to TASK_SIZE
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 20 Mar 2013 04:07:28 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:33:54 +0000 (16:33 +1100)
commit719af44d145089c0b612544cec5e1cdf765c690b
tree492561f949ef3f3af30f662d8bc4cc85870ebf9e
parentd28deb5d83c2c660481acb615bbd7d51120f42b2
arm: set the page table freeing ceiling to TASK_SIZE

ARM processors with LPAE enabled use 3 levels of page tables, with an
entry in the top level (pgd) covering 1GB of virtual space.  Because of
the branch relocation limitations on ARM, the loadable modules are mapped
16MB below PAGE_OFFSET, making the corresponding 1GB pgd shared between
kernel modules and user space.

If free_pgtables() is called with the default ceiling 0, free_pgd_range()
(and subsequently called functions) also frees the page table shared
between user space and kernel modules (which is normally handled by the
ARM-specific pgd_free() function).  This patch changes defines the ARM
USER_PGTABLES_CEILING to TASK_SIZE when CONFIG_ARM_LPAE is enabled.

Note that the pgd_free() function already checks the presence of the
shared pmd page allocated by pgd_alloc() and frees it, though with ceiling
0 this wasn't necessary.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org> [3.3+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/arm/include/asm/pgtable.h