1
linux/arch/powerpc/platforms
Benjamin Herrenschmidt d0f13e3c20 [POWERPC] Introduce address space "slices"
The basic issue is to be able to do what hugetlbfs does but with
different page sizes for some other special filesystems; more
specifically, my need is:

 - Huge pages

 - SPE local store mappings using 64K pages on a 4K base page size
kernel on Cell

 - Some special 4K segments in 64K-page kernels for mapping a dodgy
type of powerpc-specific infiniband hardware that requires 4K MMU
mappings for various reasons I won't explain here.

The main issues are:

 - To maintain/keep track of the page size per "segment" (as we can
only have one page size per segment on powerpc, which are 256MB
divisions of the address space).

 - To make sure special mappings stay within their allotted
"segments" (including MAP_FIXED crap)

 - To make sure everybody else doesn't mmap/brk/grow_stack into a
"segment" that is used for a special mapping

Some of the necessary mechanisms to handle that were present in the
hugetlbfs code, but mostly in ways not suitable for anything else.

The patch relies on some changes to the generic get_unmapped_area()
that just got merged.  It still hijacks hugetlb callbacks here or
there as the generic code hasn't been entirely cleaned up yet but
that shouldn't be a problem.

So what is a slice ?  Well, I re-used the mechanism used formerly by our
hugetlbfs implementation which divides the address space in
"meta-segments" which I called "slices".  The division is done using
256MB slices below 4G, and 1T slices above.  Thus the address space is
divided currently into 16 "low" slices and 16 "high" slices.  (Special
case: high slice 0 is the area between 4G and 1T).

Doing so simplifies significantly the tracking of segments and avoids
having to keep track of all the 256MB segments in the address space.

While I used the "concepts" of hugetlbfs, I mostly re-implemented
everything in a more generic way and "ported" hugetlbfs to it.

Slices can have an associated page size, which is encoded in the mmu
context and used by the SLB miss handler to set the segment sizes.  The
hash code currently doesn't care, it has a specific check for hugepages,
though I might add a mechanism to provide per-slice hash mapping
functions in the future.

The slice code provide a pair of "generic" get_unmapped_area() (bottomup
and topdown) functions that should work with any slice size.  There is
some trickiness here so I would appreciate people to have a look at the
implementation of these and let me know if I got something wrong.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-09 16:35:00 +10:00
..
4xx [POWERPC] Re-organize Kconfig code for 4xx in arch/powerpc 2007-04-24 21:32:00 +10:00
8xx Merge branch 'kconfig' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.22 2007-04-24 08:42:11 +10:00
44x [POWERPC] Early serial debug support for PPC44x 2007-05-08 14:47:33 +10:00
52xx [POWERPC] mpc52xx suspend to deep-sleep 2007-05-07 20:31:15 +10:00
82xx Merge branch 'kconfig' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.22 2007-04-24 08:42:11 +10:00
83xx [POWERPC] Add 'mdio' to bus scan id list for platforms with QE UEC 2007-05-02 20:04:29 +10:00
85xx [POWERPC] Rename device_is_compatible to of_device_is_compatible 2007-05-07 20:31:14 +10:00
86xx [POWERPC] Rename device_is_compatible to of_device_is_compatible 2007-05-07 20:31:14 +10:00
apus
cell [POWERPC] Introduce address space "slices" 2007-05-09 16:35:00 +10:00
celleb [POWERPC] Generic check_legacy_ioport 2007-04-27 21:14:30 +10:00
chrp Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-08 11:50:19 -07:00
embedded6xx [POWERPC] Add support for 750CL Holly board 2007-05-08 11:54:20 +10:00
iseries [POWERPC] iSeries: Make HVC_ISERIES the default 2007-05-09 16:35:00 +10:00
maple [POWERPC] Rename device_is_compatible to of_device_is_compatible 2007-05-07 20:31:14 +10:00
pasemi Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2007-05-08 11:57:17 -07:00
powermac Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-08 11:50:19 -07:00
prep [POWERPC] Split several platforms into their respective Kconfig file 2007-03-22 10:07:32 -05:00
ps3 [POWERPC] PS3: Interrupt routine fixups. 2007-05-02 20:04:31 +10:00
pseries [POWERPC] RTAS MSI implementation 2007-05-08 13:40:31 +10:00
Kconfig [POWERPC] Support for the Ebony 440GP reference board in arch/powerpc 2007-05-08 14:47:32 +10:00
Makefile [POWERPC] Add powerpc/platforms/44x, disable platforms/4xx for now 2007-05-08 14:43:59 +10:00