public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* Converting architectures to 4 level page tables
@ 2005-01-02  2:50 Nick Piggin
  0 siblings, 0 replies; only message in thread
From: Nick Piggin @ 2005-01-02  2:50 UTC (permalink / raw)
  To: linux-arch; +Cc: Andrew Morton

Hello arch maintainers,

Linus has just merged the 4 level page tables patch into -bk.
However, this is slightly modified from the pml4 version you
would have seen. Which means fewer architectures have been
tested at this stage.

Fortunately, nobody should need to immediately do any fixups on
their architectures, because we have introduced a compatibility
header that should get things working for all archs.

* Testing on all architectures would be very welcome though! *


The advantages of moving away from the compatibility header is
that you'll get better static type checking when compiling the
generic mm code; and that we'll eventually be able to simplify
some small complexities in generic code that currently handle
the compatibility scheme.

I don't think continued use of the compatibility header is any
problem for a 2.6.11 release, provided some testing gets done.
But for those who want to move from the compatibility header to
the generic 'folding' headers (**), there are a few changes you'll
need to do the following:


* replace
     #include <asm-generic/4level-fixup.h>
   in asm/pgtable.h with
     #include <asm-generic/pgtable-nopud.h>

* rename
   pgd_none, pgd_bad, pgd_present, pgd_clear, pgd_page, pgd_populate
   to pud_*. Parameter types, etc should be changed as well.

* pmd_offset takes an argument of type pud_t * instead of pgd_t *.

* Add a pud_free_tlb function if you're not using asm-generic/tlb.h
   This can be a noop, but for simplicity I've used the same definition
   as the generic one for ia64 (which will basically turn into a noop).

* Add in the pud stage to your arch/ code that walks page tables.
   You should be able to just follow compiler warnings/errors to
   track these down.

* Look at the ia64 conversion for hints.

* Architectures with 2-level page tables may alternatively use
   pgtable-nopmd.h rather than -nopud.h, however that will mean more
   work to remove the existing 3 into 2 folding stuff. It would be
   nice to get this done one day though. Look at the 2-level i386
   conversion for ideas (actually i386 isn't the best example of
   this because it has some code mixed in to handle 3 levels as well.
   I've tried to clean this up a bit though).


(**) We have introduced asm-generic/ 'folding' headers, for 2 and
3 level architectures, rather than have them do the page table
folding in their own headers. This is just a bit of cleanup and
consolidation work, no functional changes, and no reason why you
*must* use these headers (but you should!).

Please CC me on replies.

Thanks,
Nick

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-02  2:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-02  2:50 Converting architectures to 4 level page tables Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox