Commit 217614e9 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

m68k: mm: Add and use "fault.h"

When building with W=1:

    arch/m68k/mm/fault.c:22:5: warning: no previous prototype for ‘send_fault_sig’ [-Wmissing-prototypes]
       22 | int send_fault_sig(struct pt_regs *regs)
	  |     ^~~~~~~~~~~~~~
    arch/m68k/mm/fault.c:68:5: warning: no previous prototype for ‘do_page_fault’ [-Wmissing-prototypes]
       68 | int do_page_fault(struct pt_regs *regs, unsigned long address,
	  |     ^~~~~~~~~~~~~

Fix this by introducing a new header file "fault.h" for holding the
prototypes of functions implemented in arch/m68k/mm/fault.c.
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/ef004b8cfe4aac892aa0fb7714c2ed81a02a9b89.1694613528.git.geert@linux-m68k.org
parent 87d7186e
......@@ -35,8 +35,7 @@
#include <asm/tlb.h>
asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long error_code);
#include "../mm/fault.h"
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
......
......@@ -42,6 +42,7 @@
#include <asm/tlbflush.h>
#include "traps.h"
#include "../mm/fault.h"
static const char *vec_names[] = {
[VEC_RESETSP] = "RESET SP",
......@@ -126,10 +127,6 @@ static const char *space_names[] = {
};
void die_if_kernel(char *,struct pt_regs *,int);
asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long error_code);
int send_fault_sig(struct pt_regs *regs);
asmlinkage void trap_c(struct frame *fp);
#if defined (CONFIG_M68060)
......
......@@ -17,6 +17,8 @@
#include <asm/setup.h>
#include <asm/traps.h>
#include "fault.h"
extern void die_if_kernel(char *, struct pt_regs *, long);
int send_fault_sig(struct pt_regs *regs)
......
/* SPDX-License-Identifier: GPL-2.0 */
struct pt_regs;
int do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long error_code);
int send_fault_sig(struct pt_regs *regs);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment