diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-09-24 03:14:56 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-24 11:16:57 -0400 |
commit | e258d719ff28ecc7a048eb8f78380e68c4b3a3f0 (patch) | |
tree | 1c7f496b97cef1111b230371940e603a2ca401a4 /arch/s390/mm | |
parent | 7d7c7b24e416afb2637be8447e03ca4457c100fd (diff) |
s390/uaccess: always run the kernel in home space
Simplify the uaccess code by removing the user_mode=home option.
The kernel will now always run in the home space mode.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/fault.c | 9 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index fc6679210d83..8f29762671cf 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -115,13 +115,8 @@ static inline int user_space_fault(unsigned long trans_exc_code) | |||
115 | if (trans_exc_code == 2) | 115 | if (trans_exc_code == 2) |
116 | /* Access via secondary space, set_fs setting decides */ | 116 | /* Access via secondary space, set_fs setting decides */ |
117 | return current->thread.mm_segment.ar4; | 117 | return current->thread.mm_segment.ar4; |
118 | if (s390_user_mode == HOME_SPACE_MODE) | ||
119 | /* User space if the access has been done via home space. */ | ||
120 | return trans_exc_code == 3; | ||
121 | /* | 118 | /* |
122 | * If the user space is not the home space the kernel runs in home | 119 | * Access via primary space or access register is from user space |
123 | * space. Access via secondary space has already been covered, | ||
124 | * access via primary space or access register is from user space | ||
125 | * and access via home space is from the kernel. | 120 | * and access via home space is from the kernel. |
126 | */ | 121 | */ |
127 | return trans_exc_code != 3; | 122 | return trans_exc_code != 3; |
@@ -471,7 +466,7 @@ int __handle_fault(unsigned long uaddr, unsigned long pgm_int_code, int write) | |||
471 | int access, fault; | 466 | int access, fault; |
472 | 467 | ||
473 | /* Emulate a uaccess fault from kernel mode. */ | 468 | /* Emulate a uaccess fault from kernel mode. */ |
474 | regs.psw.mask = psw_kernel_bits | PSW_MASK_DAT | PSW_MASK_MCHECK; | 469 | regs.psw.mask = PSW_KERNEL_BITS | PSW_MASK_DAT | PSW_MASK_MCHECK; |
475 | if (!irqs_disabled()) | 470 | if (!irqs_disabled()) |
476 | regs.psw.mask |= PSW_MASK_IO | PSW_MASK_EXT; | 471 | regs.psw.mask |= PSW_MASK_IO | PSW_MASK_EXT; |
477 | regs.psw.addr = (unsigned long) __builtin_return_address(0); | 472 | regs.psw.addr = (unsigned long) __builtin_return_address(0); |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index de8cbc30dcd1..94f37a9fb1e5 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -1157,10 +1157,6 @@ int s390_enable_sie(void) | |||
1157 | struct mm_struct *mm = tsk->mm; | 1157 | struct mm_struct *mm = tsk->mm; |
1158 | struct mmu_gather tlb; | 1158 | struct mmu_gather tlb; |
1159 | 1159 | ||
1160 | /* Do we have switched amode? If no, we cannot do sie */ | ||
1161 | if (s390_user_mode == HOME_SPACE_MODE) | ||
1162 | return -EINVAL; | ||
1163 | |||
1164 | /* Do we have pgstes? if yes, we are done */ | 1160 | /* Do we have pgstes? if yes, we are done */ |
1165 | if (mm_has_pgste(tsk->mm)) | 1161 | if (mm_has_pgste(tsk->mm)) |
1166 | return 0; | 1162 | return 0; |