aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:37 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-02-09 12:24:41 -0500
commit6252d702c5311ce916caf75ed82e5c8245171c92 (patch)
tree3490f27b5f888ff2c1ec915d4e7201000f37a771 /arch/s390/kernel
parent5a216a20837c5f5fa1ca4b8ae8991ffd96b08e6f (diff)
[S390] dynamic page tables.
Add support for different number of page table levels dependent on the highest address used for a process. This will cause a 31 bit process to use a two level page table instead of the four level page table that is the default after the pud has been introduced. Likewise a normal 64 bit process will use three levels instead of four. Only if a process runs out of the 4 tera bytes which can be addressed with a three level page table the fourth level is dynamically added. Then the process can use up to 8 peta byte. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/binfmt_elf32.c11
-rw-r--r--arch/s390/kernel/traps.c3
2 files changed, 13 insertions, 1 deletions
diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c
index f1e40ca00d8d..3e1c315b736d 100644
--- a/arch/s390/kernel/binfmt_elf32.c
+++ b/arch/s390/kernel/binfmt_elf32.c
@@ -134,6 +134,7 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
134} 134}
135 135
136#include <asm/processor.h> 136#include <asm/processor.h>
137#include <asm/pgalloc.h>
137#include <linux/module.h> 138#include <linux/module.h>
138#include <linux/elfcore.h> 139#include <linux/elfcore.h>
139#include <linux/binfmts.h> 140#include <linux/binfmts.h>
@@ -183,6 +184,16 @@ struct elf_prpsinfo32
183#undef start_thread 184#undef start_thread
184#define start_thread start_thread31 185#define start_thread start_thread31
185 186
187static inline void start_thread31(struct pt_regs *regs, unsigned long new_psw,
188 unsigned long new_stackp)
189{
190 set_fs(USER_DS);
191 regs->psw.mask = psw_user32_bits;
192 regs->psw.addr = new_psw;
193 regs->gprs[15] = new_stackp;
194 crst_table_downgrade(current->mm, 1UL << 31);
195}
196
186MODULE_DESCRIPTION("Binary format loader for compatibility with 32bit Linux for S390 binaries," 197MODULE_DESCRIPTION("Binary format loader for compatibility with 32bit Linux for S390 binaries,"
187 " Copyright 2000 IBM Corporation"); 198 " Copyright 2000 IBM Corporation");
188MODULE_AUTHOR("Gerhard Tonn <ton@de.ibm.com>"); 199MODULE_AUTHOR("Gerhard Tonn <ton@de.ibm.com>");
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index a4d29025ddbd..60f728aeaf12 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -60,6 +60,7 @@ int sysctl_userprocess_debug = 0;
60extern pgm_check_handler_t do_protection_exception; 60extern pgm_check_handler_t do_protection_exception;
61extern pgm_check_handler_t do_dat_exception; 61extern pgm_check_handler_t do_dat_exception;
62extern pgm_check_handler_t do_monitor_call; 62extern pgm_check_handler_t do_monitor_call;
63extern pgm_check_handler_t do_asce_exception;
63 64
64#define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; }) 65#define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; })
65 66
@@ -730,7 +731,7 @@ void __init trap_init(void)
730 pgm_check_table[0x12] = &translation_exception; 731 pgm_check_table[0x12] = &translation_exception;
731 pgm_check_table[0x13] = &special_op_exception; 732 pgm_check_table[0x13] = &special_op_exception;
732#ifdef CONFIG_64BIT 733#ifdef CONFIG_64BIT
733 pgm_check_table[0x38] = &do_dat_exception; 734 pgm_check_table[0x38] = &do_asce_exception;
734 pgm_check_table[0x39] = &do_dat_exception; 735 pgm_check_table[0x39] = &do_dat_exception;
735 pgm_check_table[0x3A] = &do_dat_exception; 736 pgm_check_table[0x3A] = &do_dat_exception;
736 pgm_check_table[0x3B] = &do_dat_exception; 737 pgm_check_table[0x3B] = &do_dat_exception;