arch: add do_page_fault prototypes
authorArnd Bergmann <arnd@arndb.de>
Mon, 6 Nov 2023 11:20:13 +0000 (12:20 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 23 Nov 2023 10:32:32 +0000 (11:32 +0100)
do_page_fault() is missing a declaration on a couple of architectures:

arch/alpha/mm/fault.c:85:1: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]
arch/csky/mm/fault.c:187:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]
arch/mips/mm/fault.c:323:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]
arch/nios2/mm/fault.c:43:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]
arch/sh/mm/fault.c:389:27: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]

Since the calling conventions are architecture specific here,
add separate prototypes for each one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/alpha/include/asm/mmu_context.h
arch/csky/include/asm/traps.h
arch/mips/include/asm/traps.h
arch/nios2/include/asm/traps.h
arch/sh/include/asm/traps_32.h

index 4eea7c616992531c09d402afeb43b17d76717195..29a3e3a1f02bec05e1c3f819330dbbf48bc84c5b 100644 (file)
@@ -183,6 +183,8 @@ ev4_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
 }
 
 extern void __load_new_mm_context(struct mm_struct *);
+asmlinkage void do_page_fault(unsigned long address, unsigned long mmcsr,
+                             long cause, struct pt_regs *regs);
 
 #ifdef CONFIG_SMP
 #define check_mmu_context()                                    \
index 495ce318d5699d0774e0095d66693376cc93d3cf..6bbbbe43165f244b25fdb2335ffd6d6bedbd377a 100644 (file)
@@ -55,4 +55,6 @@ asmlinkage void trap_c(struct pt_regs *regs);
 asmlinkage void do_notify_resume(struct pt_regs *regs,
                        unsigned long thread_info_flags);
 
+asmlinkage void do_page_fault(struct pt_regs *regs);
+
 #endif /* __ASM_CSKY_TRAPS_H */
index 15cde638b4070ca090e13adb34aec0122756e68b..d4d9f8a8fdea19285563c304dc3e82eababde35c 100644 (file)
@@ -39,4 +39,7 @@ extern char except_vec_nmi[];
        register_nmi_notifier(&fn##_nb);                                \
 })
 
+asmlinkage void do_page_fault(struct pt_regs *regs,
+       unsigned long write, unsigned long address);
+
 #endif /* _ASM_TRAPS_H */
index 82a48473280d870e813c6a298e51166f869c6487..afd77bef01c65de5c8eb17b4b9c953b45ce91a26 100644 (file)
@@ -14,6 +14,8 @@
 
 #ifndef __ASSEMBLY__
 void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr);
+void do_page_fault(struct pt_regs *regs, unsigned long cause,
+                  unsigned long address);
 #endif
 
 #endif /* _ASM_NIOS2_TRAPS_H */
index 8c5bbb7b6053cf7b63133a9b4820bee9ef8d9d79..8f14071bea7226355678ff48a226cee26e5e37be 100644 (file)
@@ -43,6 +43,9 @@ static inline void trigger_address_error(void)
 asmlinkage void do_address_error(struct pt_regs *regs,
                                 unsigned long writeaccess,
                                 unsigned long address);
+asmlinkage void do_page_fault(struct pt_regs *regs,
+                             unsigned long error_code,
+                             unsigned long address);
 asmlinkage void do_divide_error(unsigned long r4);
 asmlinkage void do_reserved_inst(void);
 asmlinkage void do_illegal_slot_inst(void);