linux/include/asm-ppc
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
..
8xx_immap.h [POWERPC] include/asm-ppc/: Spelling fixes 2007-12-20 16:17:49 +11:00
amigayle.h
amipcmcia.h
bootinfo.h [POWERPC] Remove APUS support from arch/ppc 2007-09-17 15:15:04 +10:00
bootx.h
btext.h [PATCH] powerpc: Unify udbg (#2) 2006-01-09 14:49:54 +11:00
cpm1.h [POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c 2008-01-28 08:31:05 -06:00
cpm2.h [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
delay.h
device.h Driver core: add dev_archdata to struct device 2006-12-01 14:52:01 -08:00
floppy.h cleanup floppy.h 2007-10-17 08:42:55 -07:00
fs_pd.h POWERPC: Get rid of remapping the whole immr 2006-09-21 22:37:58 +04:00
gg2.h
gt64260_defs.h
gt64260.h [POWERPC] ARCH=ppc pt_regs fixes 2006-10-10 11:55:25 +10:00
harrier.h [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
hawk_defs.h
hawk.h
highmem.h [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
hydra.h include files: convert "include" subdirectory to UTF-8 2007-05-09 08:58:21 +02:00
ibm4xx.h [POWERPC] Merge common virtex header files 2007-04-30 11:02:04 +10:00
ibm44x.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ibm403.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ibm405.h
ibm_ocp_pci.h
ibm_ocp.h [PATCH] ppc32: remove "jumbo" member from ocp_func_emac_data 2006-01-06 08:33:30 -08:00
immap_cpm2.h
io.h Remove dma_cache_(wback|inv|wback_inv) functions 2007-10-17 08:42:57 -07:00
irq_regs.h softlockup: make asm/irq_regs.h available on every platform 2007-10-17 08:42:47 -07:00
kdebug.h move die notifier handling to common code 2007-05-08 11:15:04 -07:00
kgdb.h [PATCH] ppc: Fix ARCH=ppc build with xmon 2005-11-08 11:19:48 +11:00
m8260_pci.h
machdep.h [POWERPC] Remove APUS support from arch/ppc 2007-09-17 15:15:04 +10:00
md.h
mk48t59.h
mmu_context.h [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
mmu.h [POWERPC] 4xx: Fix TLB 0 problem with CONFIG_SERIAL_TEXT_DEBUG 2007-12-23 13:31:16 -06:00
mpc8xx.h [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
mpc10x.h [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
mpc52xx_psc.h [POWERPC] Separate MPC52xx PSC FIFO registers from rest of PSC 2008-01-21 11:01:32 -07:00
mpc52xx.h [PATCH] ppc: Fix io.h for config with CONFIG_PCI not set 2006-11-13 14:49:25 +11:00
mpc8260_pci9.h [POWERPC] remove unused io accessors 2006-09-20 14:06:17 +10:00
mpc8260.h [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
mv64x60_defs.h fix file specification in comments 2006-10-03 23:01:26 +02:00
mv64x60.h [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support 2007-07-24 21:16:02 +00:00
ocp_ids.h
ocp.h [POWERPC] Prevent direct inclusion of <asm/rwsem.h>. 2007-09-22 14:49:21 +10:00
open_pic.h [POWERPC] PReP fixup after irq changes 2006-10-07 22:11:20 +10:00
page.h [POWERPC] Remove APUS support from arch/ppc 2007-09-17 15:15:04 +10:00
pc_serial.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
pci-bridge.h [POWERPC] Fix mmap of PCI resource with hack for X 2006-12-08 17:21:06 +11:00
pci.h PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
pgalloc.h CONFIG_HIGHPTE vs. sub-page page tables. 2008-02-08 09:22:42 -08:00
pgtable.h [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
pnp.h
ppc4xx_dma.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ppc4xx_pic.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ppc_sys.h [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
ppcboot.h [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
prep_nvram.h
prom.h [POWERPC] Remove get_property and device_is_compatible 2007-08-17 11:01:58 +10:00
raven.h
reg_booke.h [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
residual.h
rio.h [PATCH] RapidIO support: ppc32 2005-11-07 07:53:47 -08:00
rtc.h fix file specification in comments 2006-10-03 23:01:26 +02:00
serial.h [PPC] Remove 85xx from arch/ppc 2008-01-28 08:33:10 -06:00
smp.h [POWERPC] PReP fixup after irq changes 2006-10-07 22:11:20 +10:00
spinlock.h [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks 2006-10-01 00:39:21 -07:00
suspend.h
system.h Add cmpxchg_local to ppc 2008-02-07 08:42:32 -08:00
time.h Replace __attribute_pure__ with __pure 2007-10-18 14:37:32 -07:00
todc.h [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
traps.h
zorro.h