linux-stable-rt/include/asm-mips
Martin Schwidefsky 2f569afd9c CONFIG_HIGHPTE vs. sub-page page tables.
Background: I've implemented 1K/2K page tables for s390.  These sub-page
page tables are required to properly support the s390 virtualization
instruction with KVM.  The SIE instruction requires that the page tables
have 256 page table entries (pte) followed by 256 page status table entries
(pgste).  The pgstes are only required if the process is using the SIE
instruction.  The pgstes are updated by the hardware and by the hypervisor
for a number of reasons, one of them is dirty and reference bit tracking.
To avoid wasting memory the standard pte table allocation should return
1K/2K (31/64 bit) and 2K/4K if the process is using SIE.

Problem: Page size on s390 is 4K, page table size is 1K or 2K.  That means
the s390 version for pte_alloc_one cannot return a pointer to a struct
page.  Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one
cannot return a pointer to a pte either, since that would require more than
32 bit for the return value of pte_alloc_one (and the pte * would not be
accessible since its not kmapped).

Solution: The only solution I found to this dilemma is a new typedef: a
pgtable_t.  For s390 pgtable_t will be a (pte *) - to be introduced with a
later patch.  For everybody else it will be a (struct page *).  The
additional problem with the initialization of the ptl lock and the
NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and
a destructor pgtable_page_dtor.  The page table allocation and free
functions need to call these two whenever a page table page is allocated or
freed.  pmd_populate will get a pgtable_t instead of a struct page pointer.
 To get the pgtable_t back from a pmd entry that has been installed with
pmd_populate a new function pmd_pgtable is added.  It replaces the pmd_page
call in free_pte_range and apply_to_pte_range.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:42 -08:00
..
dec
emma2rh
fw [MIPS] CFE: Make code remotely resemble Linux code. 2008-01-29 10:14:55 +00:00
ip32
jmr3927
lasat
mach-atlas
mach-au1x00 au1xxx-ide: use hwif->dev 2008-02-01 23:09:31 +01:00
mach-bcm47xx
mach-cobalt [MIPS] remove unneeded button check for reset 2008-01-29 10:15:00 +00:00
mach-db1x00
mach-dec
mach-emma2rh
mach-excite include/asm-mips/: Spelling fixes 2008-02-03 16:57:20 +02:00
mach-generic
mach-ip22
mach-ip27
mach-ip28 [MIPS] IP28 support 2008-01-29 10:14:58 +00:00
mach-ip32
mach-jazz
mach-jmr3927
mach-lasat
mach-lemote
mach-mips
mach-mipssim
mach-pb1x00
mach-pnx8550
mach-rm
mach-sibyte
mach-tx49xx
mach-vr41xx
mach-wrppmc include/asm-mips/: Spelling fixes 2008-02-03 16:57:20 +02:00
mach-yosemite
mips-boards [MIPS] Malta, Atlas: move an extern function declaration to the header file 2008-01-29 10:15:05 +00:00
pci
pmc-sierra/msp71xx [MIPS] Delete CONFIG_MSP_FPGA 2008-01-29 10:15:01 +00:00
sgi include/asm-mips/: Spelling fixes 2008-02-03 16:57:20 +02:00
sibyte [MIPS] Remove CONFIG_SIBYTE_PT{1120,1125,SWARM} 2008-01-29 10:14:58 +00:00
sn include/asm-mips/: Spelling fixes 2008-02-03 16:57:20 +02:00
tx4927 [MIPS] TXx9 watchdog support for rbhma3100,rbhma4200,rbhma4500 2008-01-29 10:14:58 +00:00
tx4938
vr41xx
xtalk
Kbuild
a.out.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
abi.h
addrspace.h [MIPS] Put cast inside macro instead of all the callers 2008-01-29 10:14:55 +00:00
asm.h [MIPS] IP28: added cache barrier to assembly routines 2008-01-29 10:14:58 +00:00
asmmacro-32.h
asmmacro-64.h
asmmacro.h
atomic.h
auxvec.h
barrier.h
bcache.h
bitops.h
bootinfo.h [MIPS] RM: Collected changes 2008-01-29 10:14:59 +00:00
branch.h
break.h
bug.h
bugs.h [MIPS] R4000/R4400 errata workarounds 2008-01-29 10:14:54 +00:00
byteorder.h
cache.h
cachectl.h
cacheflush.h
cacheops.h [MIPS] Cacheops.h: Fix typo. 2008-01-15 01:04:42 +00:00
checksum.h
cmpxchg.h Add cmpxchg64 and cmpxchg64_local to mips 2008-02-07 08:42:30 -08:00
compat-signal.h
compat.h asm-*/compat.h: fix typo in comment 2008-02-03 16:32:51 +02:00
compiler.h
cpu-features.h
cpu-info.h [MIPS] MT: Scheduler support for SMT 2008-01-29 10:14:57 +00:00
cpu.h [MIPS] Alchemy: Au1210/Au1250 CPU support 2008-01-29 10:14:59 +00:00
cputime.h
current.h
debug.h
delay.h [MIPS] R4000/R4400 daddiu erratum workaround 2008-01-29 10:14:55 +00:00
device.h
div64.h
dma-mapping.h
dma.h [MIPS] IP28 support 2008-01-29 10:14:58 +00:00
ds1286.h
dsp.h
edac.h
elf.h Cleanup asm/{elf,page,user}.h: #ifdef __KERNEL__ is no longer needed 2008-02-07 08:42:30 -08:00
emergency-restart.h
errno.h
fb.h
fcntl.h
fixmap.h [MIPS] fixmap: delete unused __set_fixmap, set_fixmap and set_fixmap_nocache 2008-01-29 10:15:00 +00:00
floppy.h
fpregdef.h
fpu.h
fpu_emulator.h
futex.h
gdb-stub.h
gpio.h
gt64120.h
hardirq.h
hazards.h
highmem.h
hw_irq.h
i8253.h
i8259.h
ide.h
inst.h
inventory.h
io.h
ioctl.h
ioctls.h
ipcbuf.h
irq.h
irq_cpu.h
irq_gt641xx.h
irq_regs.h
irqflags.h
isadep.h
jazz.h
jazzdma.h
kdebug.h
kexec.h
kmap_types.h
kspd.h
linkage.h
local.h
m48t35.h
m48t37.h
mc146818-time.h
mc146818rtc.h
mips_mt.h
mipsmtregs.h
mipsprom.h [MIPS] RM: Collected changes 2008-01-29 10:14:59 +00:00
mipsregs.h
mman.h
mmu.h
mmu_context.h
mmzone.h
module.h
msc01_ic.h
msgbuf.h
mutex.h
namei.h
nile4.h
paccess.h
page.h CONFIG_HIGHPTE vs. sub-page page tables. 2008-02-08 09:22:42 -08:00
param.h
parport.h
pci.h
percpu.h
pgalloc.h CONFIG_HIGHPTE vs. sub-page page tables. 2008-02-08 09:22:42 -08:00
pgtable-32.h
pgtable-64.h
pgtable-bits.h
pgtable.h
pmon.h
poll.h
posix_types.h asm-*/posix_types.h: scrub __GLIBC__ 2008-02-08 09:22:34 -08:00
prctl.h
prefetch.h
processor.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
ptrace.h
qemu.h
r4kcache.h [MIPS] Use real cache invalidate 2008-01-29 10:14:57 +00:00
reboot.h
reg.h
regdef.h
resource.h
rm9k-ocd.h
rtlx.h
scatterlist.h
seccomp.h
sections.h
segment.h
semaphore.h
sembuf.h
serial.h
setup.h
sgialib.h
sgiarcs.h
sgidefs.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sim.h
smp-ops.h [MIPS] SMP: Call platform methods via ops structure. 2008-01-29 10:14:57 +00:00
smp.h [MIPS] SMP: Call platform methods via ops structure. 2008-01-29 10:14:57 +00:00
smtc.h
smtc_ipi.h [MIPS] SMTC: Fix build error. 2008-01-22 00:35:23 +00:00
smtc_proc.h
sni.h [MIPS] RM: Collected changes 2008-01-29 10:14:59 +00:00
socket.h [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
stackframe.h [MIPS] R4000/R4400 daddiu erratum workaround 2008-01-29 10:14:55 +00:00
stacktrace.h
stat.h
statfs.h
string.h
suspend.h
sysmips.h
system.h
termbits.h
termios.h
thread_info.h
time.h [MIPS] time: remove unused mips_timer_state() 2008-01-29 10:15:00 +00:00
timex.h
titan_dep.h
tlb.h
tlbdebug.h
tlbflush.h
topology.h [MIPS] MT: Scheduler support for SMT 2008-01-29 10:14:57 +00:00
traps.h
txx9irq.h
txx9tmr.h
types.h
uaccess.h [MIPS] R4000/R4400 daddiu erratum workaround 2008-01-29 10:14:55 +00:00
ucontext.h
unaligned.h
unistd.h
user.h Sanitize the type of struct user.u_ar0 2008-02-07 08:42:30 -08:00
vga.h
vpe.h
war.h [MIPS] R4000/R4400 errata workarounds 2008-01-29 10:14:54 +00:00
wbflush.h
xor.h