]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
powerpc/mm: Move around testing of _PAGE_PRESENT in hash code
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 22 Jul 2010 22:53:23 +0000 (08:53 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 22 Jul 2010 22:53:23 +0000 (08:53 +1000)
commitca91e6c09d656c6deb1f2bc5d57186c718106aa5
treea8d30759b6fac5616691b7a4a94222ab371d2bd6
parentb1623e7eb280f853f60338c7bb68bd3f3a970205
powerpc/mm: Move around testing of _PAGE_PRESENT in hash code

Instead of adding _PAGE_PRESENT to the access permission mask
in each low level routine independently, we add it once from
hash_page().

We also move the preliminary access check (the racy one before
the PTE is locked) up so it applies to the huge page case. This
duplicates code in __hash_page_huge() which we'll remove in a
subsequent patch to fix a race in there.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/hash_low_64.S
arch/powerpc/mm/hash_utils_64.c