aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/fault.c
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2018-08-17 18:44:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-17 19:20:28 -0400
commit50a7ca3c6fc86955f99fc432fc8a186b968b365b (patch)
tree7918bfb3ef8558bfadbc362d0f1bae79bb20d729 /arch/powerpc/mm/fault.c
parent0882ff9190e3bc51e2d78c3aadd7c690eeaa91d5 (diff)
mm: convert return type of handle_mm_fault() caller to vm_fault_t
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t") In this patch all the caller of handle_mm_fault() are changed to return vm_fault_t type. Link: http://lkml.kernel.org/r/20180617084810.GA6730@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Tony Luck <tony.luck@intel.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michal Simek <monstr@monstr.eu> Cc: James Hogan <jhogan@kernel.org> Cc: Ley Foon Tan <lftan@altera.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: James E.J. Bottomley <jejb@parisc-linux.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: David S. Miller <davem@davemloft.net> Cc: Richard Weinberger <richard@nod.at> Cc: Guan Xuetao <gxt@pku.edu.cn> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r--arch/powerpc/mm/fault.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index b1ca7a0974e3..7c061313cc6f 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -156,7 +156,7 @@ static noinline int bad_access(struct pt_regs *regs, unsigned long address)
156} 156}
157 157
158static int do_sigbus(struct pt_regs *regs, unsigned long address, 158static int do_sigbus(struct pt_regs *regs, unsigned long address,
159 unsigned int fault) 159 vm_fault_t fault)
160{ 160{
161 siginfo_t info; 161 siginfo_t info;
162 unsigned int lsb = 0; 162 unsigned int lsb = 0;
@@ -187,7 +187,8 @@ static int do_sigbus(struct pt_regs *regs, unsigned long address,
187 return 0; 187 return 0;
188} 188}
189 189
190static int mm_fault_error(struct pt_regs *regs, unsigned long addr, int fault) 190static int mm_fault_error(struct pt_regs *regs, unsigned long addr,
191 vm_fault_t fault)
191{ 192{
192 /* 193 /*
193 * Kernel page fault interrupted by SIGKILL. We have no reason to 194 * Kernel page fault interrupted by SIGKILL. We have no reason to
@@ -415,7 +416,7 @@ static int __do_page_fault(struct pt_regs *regs, unsigned long address,
415 int is_exec = TRAP(regs) == 0x400; 416 int is_exec = TRAP(regs) == 0x400;
416 int is_user = user_mode(regs); 417 int is_user = user_mode(regs);
417 int is_write = page_fault_is_write(error_code); 418 int is_write = page_fault_is_write(error_code);
418 int fault, major = 0; 419 vm_fault_t fault, major = 0;
419 bool must_retry = false; 420 bool must_retry = false;
420 421
421 if (notify_page_fault(regs)) 422 if (notify_page_fault(regs))