Commit cca12b42 authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik
Browse files

s390/mm,fault: remove VM_FAULT_PFAULT



Handling of VM_FAULT_PFAULT and VM_FAULT_BADCONTEXT is nearly identical;
the only difference is within do_no_context() where however the fault_type
(KERNEL_FAULT vs GMAP_FAULT) makes sure that both types will be handled
differently.

Therefore it is possible to get rid of VM_FAULT_PFAULT and use
VM_FAULT_BADCONTEXT instead.

Reviewed-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent f67c2da9
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@
#define VM_FAULT_BADMAP		((__force vm_fault_t)0x40000000)
#define VM_FAULT_BADACCESS	((__force vm_fault_t)0x20000000)
#define VM_FAULT_SIGNAL		((__force vm_fault_t)0x10000000)
#define VM_FAULT_PFAULT		((__force vm_fault_t)0x8000000)

enum fault_type {
	KERNEL_FAULT,
@@ -294,7 +293,6 @@ static void do_fault_error(struct pt_regs *regs, vm_fault_t fault)
		}
		fallthrough;
	case VM_FAULT_BADCONTEXT:
	case VM_FAULT_PFAULT:
		do_no_context(regs, fault);
		break;
	case VM_FAULT_SIGNAL:
@@ -459,7 +457,7 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
			 * mmap_lock has not been released
			 */
			current->thread.gmap_pfault = 1;
			fault = VM_FAULT_PFAULT;
			fault = VM_FAULT_BADCONTEXT;
			goto out_up;
		}
		flags &= ~FAULT_FLAG_RETRY_NOWAIT;