]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sparc64: Encode huge PMDs using PTE encoding.
authorDavid S. Miller <davem@davemloft.net>
Thu, 26 Sep 2013 20:45:15 +0000 (13:45 -0700)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 14:08:20 +0000 (15:08 +0100)
commiteaf019930a792be35c923e73ebe4d9ce5ef1513b
treedef09f6e69b7aa9866f71b30f1c3f51272ab87c1
parentf82fe1d262dcaecb542c91afe3ef23576d773689
sparc64: Encode huge PMDs using PTE encoding.

commit a7b9403f0e6d5f99139dca18be885819c8d380a1 upstream.

Now that we have 64-bits for PMDs we can stop using special encodings
for the huge PMD values, and just put real PTEs in there.

We allocate a _PAGE_PMD_HUGE bit to distinguish between plain PMDs and
huge ones.  It is the same for both 4U and 4V PTE layouts.

We also use _PAGE_SPECIAL to indicate the splitting state, since a
huge PMD cannot also be special.

All of the PMD --> PTE translation code disappears, and most of the
huge PMD bit modifications and tests just degenerate into the PTE
operations.  In particular USER_PGTABLE_CHECK_PMD_HUGE becomes
trivial.

As a side effect, normal PMDs don't shift the physical address around.
This also speeds up the page table walks in the TLB miss paths since
they don't have to do the shifts any more.

Another non-trivial aspect is that pte_modify() has to be changed
to preserve the _PAGE_PMD_HUGE bits as well as the page size field
of the pte.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/pgtable_64.h
arch/sparc/include/asm/tsb.h
arch/sparc/mm/gup.c
arch/sparc/mm/init_64.c
arch/sparc/mm/tlb.c