linux/include/asm-xtensa
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
..
platform-iss fix file specification in comments 2007-05-09 08:58:16 +02:00
variant-fsf [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
a.out.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
asmmacro.h [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
atomic.h atomic.h: atomic_add_unless as inline. Remove system.h atomic.h circular dependency 2007-05-08 11:15:20 -07:00
auxvec.h
bitops.h forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
bootparam.h
bug.h [PATCH] xtensa: fix irq and misc fixes 2006-12-10 09:55:39 -08:00
bugs.h [XTENSA] Remove extraneous include statement 2007-08-27 13:53:27 -07:00
byteorder.h [XTENSA] clean-up header files 2007-05-31 17:47:01 -07:00
cache.h [XTENSA] Add support for cache-aliasing 2007-08-27 13:54:16 -07:00
cacheasm.h [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
cacheflush.h [XTENSA] Add support for cache-aliasing 2007-08-27 13:54:16 -07:00
checksum.h [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
coprocessor.h [XTENSA] Remove non-rt signal handling 2007-05-31 17:49:32 -07:00
cpumask.h
cputime.h
current.h
delay.h
device.h
div64.h [XTENSA] Use generic 64-bit division 2007-05-31 17:46:09 -07:00
dma-mapping.h xtensa: dma-mapping.h is using linux/scatterlist.h functions, so include it 2007-10-24 13:28:40 +02:00
dma.h [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
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 fbdev: detect primary display device 2007-07-17 10:23:11 -07:00
fcntl.h Xtensa: use asm-generic/fcntl.h 2007-05-31 20:18:25 -07:00
futex.h
hardirq.h
highmem.h
hw_irq.h
ide.h
io.h [XTENSA] Add support for cache-aliasing 2007-08-27 13:54:16 -07:00
ioctl.h
ioctls.h [patch 1/2] Xtensa: enable arbitary tty speed setting ioctls 2007-08-27 13:54:25 -07:00
ipcbuf.h
irq_regs.h [PATCH] xtensa: fix irq and misc fixes 2006-12-10 09:55:39 -08:00
irq.h [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
Kbuild
kdebug.h move die notifier handling to common code 2007-05-08 11:15:04 -07:00
kmap_types.h
linkage.h
local.h
mman.h [PATCH] Remove final references to deprecated "MAP_ANON" page protection flag 2007-02-11 10:51:17 -08:00
mmu_context.h [XTENSA] clean-up header files 2007-05-31 17:47:01 -07:00
mmu.h
module.h
msgbuf.h
mutex.h
namei.h
page.h CONFIG_HIGHPTE vs. sub-page page tables. 2008-02-08 09:22:42 -08:00
param.h avoid overflows in kernel/time.c 2008-02-08 09:22:39 -08:00
pci-bridge.h
pci.h PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
percpu.h
pgalloc.h CONFIG_HIGHPTE vs. sub-page page tables. 2008-02-08 09:22:42 -08:00
pgtable.h [XTENSA] Add support for cache-aliasing 2007-08-27 13:54:16 -07:00
platform.h
poll.h Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
posix_types.h asm-*/posix_types.h: scrub __GLIBC__ 2008-02-08 09:22:34 -08:00
processor.h aout: move STACK_TOP[_MAX] to asm/processor.h 2008-02-08 09:22:29 -08:00
ptrace.h [XTENSA] Remove non-rt signal handling 2007-05-31 17:49:32 -07:00
regs.h [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
resource.h
rmap.h
rwsem.h
scatterlist.h Add CONFIG_DEBUG_SG sg validation 2007-10-22 21:20:03 +02:00
sections.h
segment.h
semaphore.h kill DECLARE_MUTEX_LOCKED 2007-10-17 08:42:47 -07:00
sembuf.h [PATCH] xtensa: remove extra header files 2006-12-10 09:55:39 -08:00
serial.h
setup.h
shmbuf.h [PATCH] xtensa: fix system call interface 2006-12-10 09:55:39 -08:00
shmparam.h [XTENSA] clean-up header files 2007-05-31 17:47:01 -07:00
sigcontext.h [XTENSA] Remove non-rt signal handling 2007-05-31 17:49:32 -07:00
siginfo.h
signal.h
smp.h
socket.h [NET]: Introducing socket mark socket option. 2008-01-31 19:27:19 -08:00
sockios.h [NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution 2007-04-25 22:24:04 -07:00
spinlock.h
stat.h [PATCH] xtensa: fix system call interface 2006-12-10 09:55:39 -08:00
statfs.h
string.h
syscall.h [XTENSA] Fix fadvise64_64 2007-08-27 13:53:32 -07:00
system.h Add cmpxchg_local to xtensa 2008-02-07 08:42:33 -08:00
termbits.h [patch 1/2] Xtensa: enable arbitary tty speed setting ioctls 2007-08-27 13:54:25 -07:00
termios.h [patch 1/2] Xtensa: enable arbitary tty speed setting ioctls 2007-08-27 13:54:25 -07:00
thread_info.h remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
timex.h [XTENSA] Fix timer instabilities. 2007-08-27 13:53:37 -07:00
tlb.h add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
tlbflush.h remove unused flush_tlb_pgtables 2007-10-19 11:53:34 -07:00
topology.h
types.h remove strict ansi check from __u64 in asm/types.h 2007-10-17 08:42:53 -07:00
uaccess.h [PATCH] Xtensa: Add ktermios and minor filename fix 2006-12-13 09:05:50 -08:00
ucontext.h
unaligned.h
unistd.h [XTENSA] Fix fadvise64_64 2007-08-27 13:53:32 -07:00
user.h
vga.h
xor.h