android_kernel_samsung_msm8976/arch/powerpc/kernel
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
..
vdso32 [POWERPC] Support feature fixups in vdso's 2006-10-25 11:54:07 +10:00
vdso64 [POWERPC] Cell timebase bug workaround 2006-10-25 11:54:18 +10:00
align.c [POWERPC] Alignment exception uses __get/put_user_inatomic 2007-04-13 04:09:38 +10:00
asm-offsets.c [POWERPC] Introduce address space "slices" 2007-05-09 16:35:00 +10:00
audit.c
binfmt_elf32.c
btext.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
compat_audit.c
cpu_setup_6xx.S
cpu_setup_pa6t.S [POWERPC] pasemi: Enable one more hid bit 2007-04-24 21:31:49 +10:00
cpu_setup_ppc970.S [POWERPC] powerpc: Enable DEEPNAP power savings mode on 970MP 2006-10-16 16:32:25 +10:00
cputable.c [POWERPC] pasemi: PA6T oprofile support 2007-04-24 21:31:51 +10:00
crash.c [PATCH] Kexec / Kdump: Unify elf note code 2006-12-07 08:39:46 -08:00
crash_dump.c
dma_64.c [POWERPC] Make direct DMA use node local allocations 2006-12-04 20:38:59 +11:00
entry_32.S [POWERPC] Remove last_syscall 2007-03-22 22:52:58 +11:00
entry_64.S [POWERPC] Clear RI bit in MSR before restoring r13 when returning to userspace 2007-02-07 14:03:23 +11:00
firmware.c
fpu.S
head_4xx.S
head_8xx.S
head_32.S [POWERPC] Remove the broken Gemini support 2007-01-24 21:13:58 +11:00
head_44x.S [POWERPC] Early serial debug support for PPC44x 2007-05-08 14:47:33 +10:00
head_64.S [POWERPC] Save trap number in bad_stack 2007-04-24 22:06:59 +10:00
head_booke.h
head_fsl_booke.S [POWERPC] 85xx: Drop use of SYNC macro in head_fsl_booke.S 2007-02-13 16:13:27 -06:00
ibmebus.c [POWERPC] ibmebus: change probe/remove interface from using loc-code to DT path 2007-04-13 06:12:42 +10:00
idle.c [POWERPC] powermac: Suspend to disk on G5 2007-05-07 20:31:14 +10:00
idle_6xx.S
idle_power4.S [POWERPC] powermac: Support G5 CPU hotplug 2007-05-07 20:31:13 +10:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
io.c [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h 2006-12-04 20:39:05 +11:00
iomap.c [POWERPC] Remove fastcall function attribute 2007-01-26 01:52:27 -06:00
iommu.c Revert "[POWERPC] DMA 4GB boundary protection" 2007-04-26 19:48:15 +10:00
irq.c [POWERPC] Rip out the existing powerpc msi stubs 2007-05-08 13:40:31 +10:00
kprobes.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-08 11:50:19 -07:00
l2cr_6xx.S
legacy_serial.c Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
lparcfg.c [POWERPC] Replace if-then-else with a switch statement 2007-04-27 21:13:21 +10:00
lparmap.c [POWERPC] iSeries: suppress build warning in lparmap.c 2007-05-09 16:34:59 +10:00
machine_kexec.c
machine_kexec_32.c
machine_kexec_64.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
Makefile [POWERPC] PowerPC MSI infrastructure 2007-05-08 13:40:31 +10:00
misc.S [POWERPC] convert string i/o operations to C 2006-09-20 14:06:18 +10:00
misc_32.S [POWERPC] Remove _get_SP 2007-03-22 22:52:58 +11:00
misc_64.S [POWERPC] pasemi: UART udbg support 2007-02-07 14:03:22 +11:00
module_32.c [POWERPC] Add support for R_PPC_ADDR16_HI relocations 2007-01-24 21:13:58 +11:00
module_64.c [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
msi.c [POWERPC] PowerPC MSI infrastructure 2007-05-08 13:40:31 +10:00
nvram_64.c [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
of_device.c [POWERPC] Export of_device_get_modalias 2007-05-07 20:31:15 +10:00
of_platform.c [POWERPC] Early serial debug support for PPC44x 2007-05-08 14:47:33 +10:00
paca.c
pci_32.c [POWERPC] Fix STRICT_MM_TYPECHECKS 2007-05-02 20:04:30 +10:00
pci_64.c Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
pci_dn.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
pmc.c [POWERPC] PA6T PMC support 2007-02-07 14:03:19 +11:00
ppc32.h
ppc_ksyms.c [POWERPC] Remove duplicate export of __div64_32. 2007-05-02 20:04:32 +10:00
proc_ppc64.c [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
process.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
prom.c [POWERPC] Remove old interface find_devices 2007-04-24 22:09:02 +10:00
prom_init.c [POWERPC] Tell Phyp we support MSI 2007-05-08 13:40:31 +10:00
prom_parse.c [POWERPC] Uninline of_iomap function 2007-05-02 20:04:29 +10:00
ptrace-common.h
ptrace.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
ptrace32.c
rtas-proc.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
rtas-rtc.c
rtas.c [POWERPC] Remove old interface find_path_device 2007-04-24 22:08:59 +10:00
rtas_flash.c [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
rtas_pci.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
semaphore.c
setup-common.c [POWERPC] Generic check_legacy_ioport 2007-04-27 21:14:30 +10:00
setup.h
setup_32.c [POWERPC] Fix breakage caused by 72486f1f8f 2007-04-13 03:55:16 +10:00
setup_64.c [PATCH] x86: Allow percpu variables to be page-aligned 2007-05-02 19:27:12 +02:00
signal_32.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
signal_64.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
smp-tbsync.c [POWERPC] Replace kmalloc+memset with kzalloc 2006-12-04 20:42:09 +11:00
smp.c [POWERPC] Add smp_call_function_map and smp_call_function_single 2007-05-07 20:31:13 +10:00
suspend.c [PATCH] x86: Move swsusp __pa() dependent code to arch portion 2007-05-02 19:27:07 +02:00
swsusp.c [POWERPC] powermac: Suspend to disk on G5 2007-05-07 20:31:14 +10:00
swsusp_32.S [PATCH] Change the name of pagedir_nosave 2006-09-26 08:49:01 -07:00
swsusp_64.c [POWERPC] powermac: Suspend to disk on G5 2007-05-07 20:31:14 +10:00
swsusp_asm64.S [POWERPC] powermac: Suspend to disk on G5 2007-05-07 20:31:14 +10:00
sys_ppc32.c [POWERPC] Clean up unused ROUND_UP, NAME_OFFSET macros in arch/powerpc 2007-04-13 04:00:41 +10:00
syscalls.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
sysfs.c [POWERPC] Change topology_init() to a subsys_initcall 2007-05-07 20:31:13 +10:00
systbl.S
tau_6xx.c
time.c [POWERPC] Rename get_property to of_get_property: arch/powerpc 2007-04-13 03:55:19 +10:00
traps.c move die notifier handling to common code 2007-05-08 11:15:04 -07:00
udbg.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-05-08 11:50:19 -07:00
udbg_16550.c [POWERPC] Early serial debug support for PPC44x 2007-05-08 14:47:33 +10:00
vdso.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
vecemu.c
vector.S
vio.c Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
vmlinux.lds.S [PATCH] x86: Allow percpu variables to be page-aligned 2007-05-02 19:27:12 +02:00