]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sparc64: Move to 64-bit PGDs and PMDs.
authorDavid S. Miller <davem@davemloft.net>
Wed, 25 Sep 2013 21:33:16 +0000 (14:33 -0700)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 14:08:04 +0000 (15:08 +0100)
commitf82fe1d262dcaecb542c91afe3ef23576d773689
treedd05dab21c49fbe4f63a1fbdadf50bc8fba6f99f
parent86a68ad00e9811a656678fdcfb3f686ef52cdcc9
sparc64: Move to 64-bit PGDs and PMDs.

commit 2b77933c28f5044629bb19e8045aae65b72b939d upstream.

To make the page tables compact, we were using 32-bit PGDs and PMDs.
We only had to support <= 43 bits of physical addresses so this was
quite feasible.

In order to support larger physical addresses we have to move to
64-bit PGDs and PMDs.

Most of the changes are straight-forward:

1) {pgd,pmd}_t --> unsigned long

2) Anything that tries to use plain "unsigned int" types with pgd/pmd
   values needs to be adjusted.  In particular things like "0U" become
   "0UL".

3) {PGDIR,PMD}_BITS decrease by one.

4) In the assembler page table walkers, use "ldxa" instead of "lduwa"
   and adjust the low bit masks to clear out the low 3 bits instead of
   just the low 2 bits during pgd/pmd address formation.

Also, use PTRS_PER_PGD and PTRS_PER_PMD in the sizing of the
swapper_{pg_dir,low_pmd_dir} arrays.

This patch does not try to take advantage of having 64-bits in the
PMDs to simplify the hugepage code, that will come in a subsequent
change.

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