diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-12-07 06:51:43 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 06:51:33 -0500 |
commit | b11b53342773361f3353b285eb6a3fd6074e7997 (patch) | |
tree | b7fda314933b82d39cb8d30c7882ca3044dd0367 /arch/s390/include/asm/mmu_context.h | |
parent | 61365e132ef987f7719af5d2e434db4465957637 (diff) |
[S390] Improve address space mode selection.
Introduce user_mode to replace the two variables switch_amode and
s390_noexec. There are three valid combinations of the old values:
1) switch_amode == 0 && s390_noexec == 0
2) switch_amode == 1 && s390_noexec == 0
3) switch_amode == 1 && s390_noexec == 1
They get replaced by
1) user_mode == HOME_SPACE_MODE
2) user_mode == PRIMARY_SPACE_MODE
3) user_mode == SECONDARY_SPACE_MODE
The new kernel parameter user_mode=[primary,secondary,home] lets
you choose the address space mode the user space processes should
use. In addition the CONFIG_S390_SWITCH_AMODE config option
is removed.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/mmu_context.h')
-rw-r--r-- | arch/s390/include/asm/mmu_context.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index fc7edd6f41b6..976e273988c2 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
@@ -36,7 +36,7 @@ static inline int init_new_context(struct task_struct *tsk, | |||
36 | mm->context.has_pgste = 1; | 36 | mm->context.has_pgste = 1; |
37 | mm->context.alloc_pgste = 1; | 37 | mm->context.alloc_pgste = 1; |
38 | } else { | 38 | } else { |
39 | mm->context.noexec = s390_noexec; | 39 | mm->context.noexec = (user_mode == SECONDARY_SPACE_MODE); |
40 | mm->context.has_pgste = 0; | 40 | mm->context.has_pgste = 0; |
41 | mm->context.alloc_pgste = 0; | 41 | mm->context.alloc_pgste = 0; |
42 | } | 42 | } |
@@ -58,7 +58,7 @@ static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) | |||
58 | pgd_t *pgd = mm->pgd; | 58 | pgd_t *pgd = mm->pgd; |
59 | 59 | ||
60 | S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd); | 60 | S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd); |
61 | if (switch_amode) { | 61 | if (user_mode != HOME_SPACE_MODE) { |
62 | /* Load primary space page table origin. */ | 62 | /* Load primary space page table origin. */ |
63 | pgd = mm->context.noexec ? get_shadow_table(pgd) : pgd; | 63 | pgd = mm->context.noexec ? get_shadow_table(pgd) : pgd; |
64 | S390_lowcore.user_exec_asce = mm->context.asce_bits | __pa(pgd); | 64 | S390_lowcore.user_exec_asce = mm->context.asce_bits | __pa(pgd); |