linux-stable-rt/include/asm-arm
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
..
arch-aaec2000
arch-at91 [ARM] 4802/1: Fix typo and remove vague comment 2008-02-04 13:16:39 +00:00
arch-cl7500
arch-clps711x
arch-davinci
arch-ebsa110
arch-ebsa285
arch-ep93xx
arch-h720x
arch-imx
arch-integrator
arch-iop13xx async_tx: replace 'int_en' with operation preparation flags 2008-02-06 10:12:18 -07:00
arch-iop32x
arch-iop33x
arch-ixp4xx Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-02-04 15:29:53 -08:00
arch-ixp23xx
arch-ixp2000
arch-ks8695
arch-l7200
arch-lh7a40x
arch-msm
arch-mxc
arch-netx
arch-ns9xxx
arch-omap [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
arch-orion
arch-pnx4008
arch-pxa Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2008-02-07 12:57:44 -08:00
arch-realview [ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option 2008-02-04 17:52:28 +00:00
arch-rpc
arch-s3c2400
arch-s3c2410 FB/S3C2412: add S3C2412 support to S3C2410 fb driver 2008-02-06 10:41:17 -08:00
arch-sa1100
arch-shark
arch-versatile fix typo 'the same the\>' 2008-02-03 14:59:11 +02:00
hardware async_tx: replace 'int_en' with operation preparation flags 2008-02-06 10:12:18 -07:00
mach include/asm-arm/: Spelling fixes 2008-02-03 16:50:59 +02:00
plat-s3c
plat-s3c24xx [ARM] 4786/1: S3C2412: Add SPI FIFO controll constants 2008-01-28 13:20:51 +00:00
.gitignore
Kbuild
a.out-core.h aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT 2008-02-08 09:22:30 -08:00
a.out.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
assembler.h
atomic.h
auxvec.h
bitops.h ext4: Add ext4_find_next_bit() 2008-01-28 23:58:27 -05:00
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
checksum.h
cnt32_to_63.h
cpu-multi32.h
cpu-single.h
cpu.h
cputime.h
current.h
delay.h
device.h
div64.h
dma-mapping.h
dma.h
domain.h
dyntick.h
ecard.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
fiq.h
flat.h
floppy.h
fpstate.h
futex.h
glue.h
gpio.h
hardirq.h
hardware.h
hw_irq.h
hwcap.h
ide.h
io.h
ioctl.h
ioctls.h
ipcbuf.h
irq.h
irq_regs.h
irqflags.h
kdebug.h
kexec.h [ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags 2008-02-04 13:21:03 +00:00
kmap_types.h
kprobes.h
leds.h
limits.h
linkage.h
local.h
locks.h
mc146818rtc.h
memory.h
mman.h
mmu.h
mmu_context.h
mmzone.h
module.h
msgbuf.h
mtd-xip.h
mutex.h misc: removal of final callers using fastcall 2008-02-08 09:22:31 -08:00
namei.h
nwflash.h
page-nommu.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-hwdef.h
pgtable-nommu.h
pgtable.h
poll.h
posix_types.h asm-*/posix_types.h: scrub __GLIBC__ 2008-02-08 09:22:34 -08:00
proc-fns.h
processor.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
procinfo.h
ptrace.h
resource.h
rtc.h
scatterlist.h
sections.h
segment.h
semaphore-helper.h
semaphore.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sizes.h
smp.h [ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore 2008-02-04 17:52:19 +00:00
socket.h [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
sockios.h
spinlock.h
spinlock_types.h
stat.h
statfs.h
string.h
suspend.h
system.h Add cmpxchg_local to arm 2008-02-07 08:42:31 -08:00
termbits.h
termios.h
therm.h
thread_info.h
thread_notify.h
timex.h
tlb.h add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
tlbflush.h
topology.h
traps.h
types.h
uaccess.h
ucontext.h
unaligned.h
unistd.h
user.h Sanitize the type of struct user.u_ar0 2008-02-07 08:42:30 -08:00
vfp.h
vfpmacros.h
vga.h
xor.h