From patchwork Mon Dec 4 11:56:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478230 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9DAF14F9C for ; Mon, 4 Dec 2023 11:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="femcIS3o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA6FCC433C7; Mon, 4 Dec 2023 11:57:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691041; bh=fRSxX8E7EKRIPQBydKhoEniyM3aLhKn+xL3XzYVaAk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=femcIS3omFfgXtyufGHVJom0uXomMX8jSMxADx9BQCYIjldQAsUEIf8MhP4M978r7 O7bai8L2nmJW3W8l56yzH9LN3RtLW8Y0TulhUd4noZ38Gr6atBE96UZ1N2ObjY1F4x hqu3OmhDd2LYanShqrKOZDDRBLQzSn6unOCaFnNxVXTrlc4L252xz+J2q0/Qy+YIJs GGlZ0H2R7AskDgd3KWUtZyW1Gz1LorE2/k+I9ur+2cTDTfYiYfQlt9kt3Li3WR+zJB vXjedYrAzAKBdNoLauwN22lUVaZ67lAkiPv3lPxnW9flUNhK1V640WBFjIWiucJ455 rk+M1ei9P3PpQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 01/20] mips: decompress: fix add missing prototypes Date: Mon, 4 Dec 2023 12:56:51 +0100 Message-Id: <20231204115710.2247097-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann The mips decompressor has some string functions defined locally that are not declared in the right place: arch/mips/boot/compressed/dbg.c:12:13: error: no previous prototype for 'putc' [-Werror=missing-prototypes] arch/mips/boot/compressed/dbg.c:16:6: error: no previous prototype for 'puts' [-Werror=missing-prototypes] arch/mips/boot/compressed/dbg.c:26:6: error: no previous prototype for 'puthex' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:11:7: error: no previous prototype for 'memcpy' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:22:7: error: no previous prototype for 'memset' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:32:15: error: no previous prototype for 'memmove' [-Werror=missing-prototypes] arch/mips/boot/compressed/decompress.c:43:6: error: no previous prototype for 'error' [-Werror=missing-prototypes] arch/mips/boot/compressed/decompress.c:91:6: error: no previous prototype for 'decompress_kernel' [-Werror=missing-prototypes] Include the string.h header where needed and add a decompress.h header to have shared prototypes for the rest. Signed-off-by: Arnd Bergmann --- arch/mips/boot/compressed/dbg.c | 2 ++ arch/mips/boot/compressed/decompress.c | 16 ++-------------- arch/mips/boot/compressed/decompress.h | 24 ++++++++++++++++++++++++ arch/mips/boot/compressed/string.c | 1 + 4 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 arch/mips/boot/compressed/decompress.h diff --git a/arch/mips/boot/compressed/dbg.c b/arch/mips/boot/compressed/dbg.c index f6728a8fd1c3..2f1ac38fe1cc 100644 --- a/arch/mips/boot/compressed/dbg.c +++ b/arch/mips/boot/compressed/dbg.c @@ -9,6 +9,8 @@ #include #include +#include "decompress.h" + void __weak putc(char c) { } diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c index c5dd415254d3..adb6d5b0e6eb 100644 --- a/arch/mips/boot/compressed/decompress.c +++ b/arch/mips/boot/compressed/decompress.c @@ -19,6 +19,8 @@ #include #include +#include "decompress.h" + /* * These two variables specify the free mem region * that can be used for temporary malloc area @@ -26,20 +28,6 @@ unsigned long free_mem_ptr; unsigned long free_mem_end_ptr; -/* The linker tells us where the image is. */ -extern unsigned char __image_begin[], __image_end[]; - -/* debug interfaces */ -#ifdef CONFIG_DEBUG_ZBOOT -extern void puts(const char *s); -extern void puthex(unsigned long long val); -#else -#define puts(s) do {} while (0) -#define puthex(val) do {} while (0) -#endif - -extern char __appended_dtb[]; - void error(char *x) { puts("\n\n"); diff --git a/arch/mips/boot/compressed/decompress.h b/arch/mips/boot/compressed/decompress.h new file mode 100644 index 000000000000..073b64593b3d --- /dev/null +++ b/arch/mips/boot/compressed/decompress.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef _DECOMPRESSOR_H +#define _DECOMPRESSOR_H + +/* The linker tells us where the image is. */ +extern unsigned char __image_begin[], __image_end[]; + +/* debug interfaces */ +#ifdef CONFIG_DEBUG_ZBOOT +extern void putc(char c); +extern void puts(const char *s); +extern void puthex(unsigned long long val); +#else +#define putc(s) do {} while (0) +#define puts(s) do {} while (0) +#define puthex(val) do {} while (0) +#endif + +extern char __appended_dtb[]; + +void error(char *x); +void decompress_kernel(unsigned long boot_heap_start); + +#endif diff --git a/arch/mips/boot/compressed/string.c b/arch/mips/boot/compressed/string.c index 0b593b709228..f0eb251e44e5 100644 --- a/arch/mips/boot/compressed/string.c +++ b/arch/mips/boot/compressed/string.c @@ -7,6 +7,7 @@ #include #include +#include void *memcpy(void *dest, const void *src, size_t n) { From patchwork Mon Dec 4 11:56:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478231 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EA9A14F9C for ; Mon, 4 Dec 2023 11:57:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fhAUsG1z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD456C433C9; Mon, 4 Dec 2023 11:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691043; bh=IbjKyf0hdtAvqPD1GTOpKbdNaas5xVKf1Zdp6x9MKL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fhAUsG1z0ypiGchO8PAikx1OrT66HMzPMSZknlE9PFGU1wZ2gvqbzqt16ue4eQtk3 3p8rW9ftXw/QQcUyL86s168LH4Y/0loprenU33OVLXo1eqjTfrPbxmGV7Y3g/oc/jS kQ4YM2YM5X67Q/heA0v2GsWKLxiAeEdU9RF+/AAKJLOdeUgwnw8n0LjiRVNavv1Bme 4H1UjIdhJt8ZF3LIaPc2NmG47cEjahf1tLXwRTZHpSXcBW5DFSstOu872CaoW4zqBA DjkUXumc8hDa6EZjcmB9CoiZaibYiGdDMGHs4TeyHbcK06j54OAFlzrX1ioAjBL5s0 U93KC0jL3MS2g== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 02/20] mips: add asm/syscalls.h header Date: Mon, 4 Dec 2023 12:56:52 +0100 Message-Id: <20231204115710.2247097-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann System call prototypes are generally in linux/syscalls.h, but there are a couple of mips specific entry points that are missing there: arch/mips/kernel/signal.c:636:17: error: no previous prototype for 'sys_sigreturn' [-Werror=missing-prototypes] arch/mips/kernel/signal.c:673:17: error: no previous prototype for 'sys_rt_sigreturn' [-Werror=missing-prototypes] arch/mips/kernel/syscall.c:51:16: error: no previous prototype for 'sysm_pipe' [-Werror=missing-prototypes] arch/mips/kernel/mips-mt-fpaff.c:65:17: error: no previous prototype for 'mipsmt_sys_sched_setaffinity' [-Werror=missing-prototypes] arch/mips/kernel/mips-mt-fpaff.c:157:17: error: no previous prototype for 'mipsmt_sys_sched_getaffinity' [-Werror=missing-prototypes] Add these to a new asm/syscalls.h as we have in other architectures. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/syscalls.h | 33 ++++++++++++++++++++++++++++++++ arch/mips/kernel/linux32.c | 1 + arch/mips/kernel/mips-mt-fpaff.c | 1 + arch/mips/kernel/signal.c | 1 + arch/mips/kernel/signal32.c | 1 + arch/mips/kernel/signal_n32.c | 1 + arch/mips/kernel/signal_o32.c | 1 + arch/mips/kernel/syscall.c | 1 + 8 files changed, 40 insertions(+) create mode 100644 arch/mips/include/asm/syscalls.h diff --git a/arch/mips/include/asm/syscalls.h b/arch/mips/include/asm/syscalls.h new file mode 100644 index 000000000000..59f9c0c9fa0a --- /dev/null +++ b/arch/mips/include/asm/syscalls.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _ASM_MIPS_SYSCALLS_H +#define _ASM_MIPS_SYSCALLS_H + +#include +#include + +asmlinkage void sys_sigreturn(void); +asmlinkage void sys_rt_sigreturn(void); +asmlinkage int sysm_pipe(void); +asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, + unsigned long __user *user_mask_ptr); +asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len, + unsigned long __user *user_mask_ptr); +asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2, + unsigned offset_a3, unsigned len_a4, + unsigned len_a5); +asmlinkage long sys32_fadvise64_64(int fd, int __pad, + unsigned long a2, unsigned long a3, + unsigned long a4, unsigned long a5, + int flags); +asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3, + size_t count); +asmlinkage long sys32_sync_file_range(int fd, int __pad, + unsigned long a2, unsigned long a3, + unsigned long a4, unsigned long a5, + int flags); +asmlinkage void sys32_rt_sigreturn(void); +asmlinkage void sys32_sigreturn(void); +asmlinkage int sys32_sigsuspend(compat_sigset_t __user *uset); +asmlinkage void sysn32_rt_sigreturn(void); + +#endif diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 6b61be486303..a0c0a7a654e9 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@ -42,6 +42,7 @@ #include #include #include +#include #ifdef __MIPSEB__ #define merge_64(r1, r2) ((((r1) & 0xffffffffUL) << 32) + ((r2) & 0xffffffffUL)) diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index 67e130d3f038..10172fc4f627 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c @@ -15,6 +15,7 @@ #include #include #include +#include /* * CPU mask used to set process affinity for MT VPEs/TCs with FPUs diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 479999b7f2de..ccbf580827f6 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -38,6 +38,7 @@ #include #include #include +#include #include "signal-common.h" diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 59b8965433c2..73081d4ee8c1 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "signal-common.h" diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index cfc77b69420a..ff2043d620ba 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "signal-common.h" diff --git a/arch/mips/kernel/signal_o32.c b/arch/mips/kernel/signal_o32.c index 299a7a28ca33..4f0458459650 100644 --- a/arch/mips/kernel/signal_o32.c +++ b/arch/mips/kernel/signal_o32.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "signal-common.h" diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index ae93a607ddf7..1bfc34a2e5b3 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -39,6 +39,7 @@ #include #include #include +#include #include /* From patchwork Mon Dec 4 11:56:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478232 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6744114F9C for ; Mon, 4 Dec 2023 11:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="J5WjEPhO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0AC6C433C8; Mon, 4 Dec 2023 11:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691045; bh=GVPJo8uO9T+V60ClpxXsIQariQDInjL+tl05cbLyqws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5WjEPhOrZxIpNezsV3u/mxLcK7Hlo3/HZCu5+pDjyw6ptaF74uL9RVDwGkDMVor0 IBgGfGNu43qo+2Nz5Nwe6S3pJ6eGqcEp6wfpH2lQPcnfl7dWDkNEmFh5sMQo8LdBe4 /cNu7OXGtEXqtM5WTAQSy8Ae45cUF+QVK3dKvuA8d5nOL1zx3r6dJRowDoXqMJnIV/ aHUWTkM7i+MBIrm/vc4oxH7L0qg33oNbbRXYlgtLRh7be7tAAsEa42v95fyTk8R/Gl f8RXvSy68dKBpvArRPQbhCllvCazfanqRt1cELSmlpKwd5/8fw4iksMGd4lt50xo5i QiFCJ8zOsQUfQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 03/20] mips: add missing declarations for trap handlers Date: Mon, 4 Dec 2023 12:56:53 +0100 Message-Id: <20231204115710.2247097-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann These exception handlers are all called from assembly code, so they don't normally need a declaration, but without one we now get warnings: arch/mips/mm/fault.c:323:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:447:17: error: no previous prototype for 'do_be' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:752:17: error: no previous prototype for 'do_ov' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:874:17: error: no previous prototype for 'do_fpe' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1027:17: error: no previous prototype for 'do_bp' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1114:17: error: no previous prototype for 'do_tr' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1151:17: error: no previous prototype for 'do_ri' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1402:17: error: no previous prototype for 'do_cpu' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1507:17: error: no previous prototype for 'do_msa_fpe' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1527:17: error: no previous prototype for 'do_msa' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1548:17: error: no previous prototype for 'do_mdmx' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1560:17: error: no previous prototype for 'do_watch' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1587:17: error: no previous prototype for 'do_mcheck' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1612:17: error: no previous prototype for 'do_mt' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1648:17: error: no previous prototype for 'do_dsp' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1656:17: error: no previous prototype for 'do_reserved' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1832:17: error: no previous prototype for 'cache_parity_error' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1880:17: error: no previous prototype for 'do_ftlb' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1909:17: error: no previous prototype for 'do_gsexc' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1944:6: error: no previous prototype for 'ejtag_exception_handler' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1989:17: error: no previous prototype for 'nmi_exception_handler' [-Werror=missing-prototypes] arch/mips/kernel/unaligned.c:1516:17: error: no previous prototype for 'do_ade' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/traps.h | 23 +++++++++++++++++++++++ arch/mips/kernel/r4k-bugs64.c | 1 + arch/mips/kernel/unaligned.c | 1 + arch/mips/mm/fault.c | 1 + 4 files changed, 26 insertions(+) diff --git a/arch/mips/include/asm/traps.h b/arch/mips/include/asm/traps.h index d4d9f8a8fdea..1e63d7d04404 100644 --- a/arch/mips/include/asm/traps.h +++ b/arch/mips/include/asm/traps.h @@ -41,5 +41,28 @@ extern char except_vec_nmi[]; asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write, unsigned long address); +asmlinkage void do_ade(struct pt_regs *regs); +asmlinkage void do_be(struct pt_regs *regs); +asmlinkage void do_ov(struct pt_regs *regs); +asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31); +asmlinkage void do_bp(struct pt_regs *regs); +asmlinkage void do_tr(struct pt_regs *regs); +asmlinkage void do_ri(struct pt_regs *regs); +asmlinkage void do_cpu(struct pt_regs *regs); +asmlinkage void do_msa_fpe(struct pt_regs *regs, unsigned int msacsr); +asmlinkage void do_msa(struct pt_regs *regs); +asmlinkage void do_mdmx(struct pt_regs *regs); +asmlinkage void do_watch(struct pt_regs *regs); +asmlinkage void do_mcheck(struct pt_regs *regs); +asmlinkage void do_mt(struct pt_regs *regs); +asmlinkage void do_dsp(struct pt_regs *regs); +asmlinkage void do_reserved(struct pt_regs *regs); +asmlinkage void do_ftlb(void); +asmlinkage void do_gsexc(struct pt_regs *regs, u32 diag1); +asmlinkage void do_daddi_ov(struct pt_regs *regs); + +asmlinkage void cache_parity_error(void); +asmlinkage void ejtag_exception_handler(struct pt_regs *regs); +asmlinkage void __noreturn nmi_exception_handler(struct pt_regs *regs); #endif /* _ASM_TRAPS_H */ diff --git a/arch/mips/kernel/r4k-bugs64.c b/arch/mips/kernel/r4k-bugs64.c index 6ffefb2c6971..1e300330078d 100644 --- a/arch/mips/kernel/r4k-bugs64.c +++ b/arch/mips/kernel/r4k-bugs64.c @@ -14,6 +14,7 @@ #include #include #include +#include static char bug64hit[] __initdata = "reliable operation impossible!\n%s"; diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index f4cf94e92ec3..db652c99b72e 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c @@ -91,6 +91,7 @@ #include #include #include +#include #include #include "access-helper.h" diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index d7878208bd3f..aaa9a242ebba 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c @@ -26,6 +26,7 @@ #include #include #include /* For VMALLOC_END */ +#include #include int show_unhandled_signals = 1; From patchwork Mon Dec 4 11:56:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478233 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C98CE22F10 for ; Mon, 4 Dec 2023 11:57:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pUskY87v" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB8E3C433CB; Mon, 4 Dec 2023 11:57:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691047; bh=bYK15xB2ytVHbb2n+GAjb9+qJ0IKJuMx6deotQJ5QHM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pUskY87vBF60hK9aIEAt+QS0uxWl+d8yqh+vB1rNFa5tCPcB1nVNU2xouUhVSWRYT QrGULGl3xtt9ik9oAaqSQdF5Aur/ON4iNB0wFxdeq2oG9+PFBJSPooGbmOjjQoZRif W+mJcmTkeynW7TIMiaiE5h5Uvg7hLOTUb8aSgiutEpw13EmupBFUHTi3/+Yozqfsof G06QdLFYU5Thu3KXXba3mhvxn30pJBQboP2qTo493jllAnzHgO+Cv2oSrpPnPEBz0+ oIKpK/1JKzpFSesSvtuWCylh7kTNWONeaLb4KX1nY/umzQjBHYu5C+Kvdhdulj0GzB zXfxSkOLZ2Dew== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 04/20] mips: rs870e: stop exporting local functions Date: Mon, 4 Dec 2023 12:56:54 +0100 Message-Id: <20231204115710.2247097-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann These four functions are exported, but don't have any users, and no prototypes, which now causes warnings: drivers/platform/mips/rs780e-acpi.c:35:6: error: no previous prototype for 'pm_iowrite' [-Werror=missing-prototypes] drivers/platform/mips/rs780e-acpi.c:41:4: error: no previous prototype for 'pm_ioread' [-Werror=missing-prototypes] drivers/platform/mips/rs780e-acpi.c:47:6: error: no previous prototype for 'pm2_iowrite' [-Werror=missing-prototypes] drivers/platform/mips/rs780e-acpi.c:53:4: error: no previous prototype for 'pm2_ioread' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- drivers/platform/mips/rs780e-acpi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/platform/mips/rs780e-acpi.c b/drivers/platform/mips/rs780e-acpi.c index bb0e8ae0eefd..5b8f9cc32589 100644 --- a/drivers/platform/mips/rs780e-acpi.c +++ b/drivers/platform/mips/rs780e-acpi.c @@ -32,29 +32,25 @@ static u8 pmio_read_index(u16 index, u8 reg) return inb(index + 1); } -void pm_iowrite(u8 reg, u8 value) +static void pm_iowrite(u8 reg, u8 value) { pmio_write_index(PM_INDEX, reg, value); } -EXPORT_SYMBOL(pm_iowrite); -u8 pm_ioread(u8 reg) +static u8 pm_ioread(u8 reg) { return pmio_read_index(PM_INDEX, reg); } -EXPORT_SYMBOL(pm_ioread); -void pm2_iowrite(u8 reg, u8 value) +static void pm2_iowrite(u8 reg, u8 value) { pmio_write_index(PM2_INDEX, reg, value); } -EXPORT_SYMBOL(pm2_iowrite); -u8 pm2_ioread(u8 reg) +static u8 pm2_ioread(u8 reg) { return pmio_read_index(PM2_INDEX, reg); } -EXPORT_SYMBOL(pm2_ioread); static void acpi_hw_clear_status(void) { From patchwork Mon Dec 4 11:56:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478234 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C380722F10 for ; Mon, 4 Dec 2023 11:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oWgMPbij" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAAE4C433C7; Mon, 4 Dec 2023 11:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691049; bh=63/jrMa/1loCjLp+mnSNzgGTPIfRhB1ZC/FTGaLdVmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oWgMPbijBeVLdjCj9onCM1zc45ZCBY4f4h2YP/vOZexqp1X6OiLPGG3ETE6EpP+QA 0F3D3D0mts/0ZBtUr70kNlb/ZWFberEuPga79PQeYG/62NYiI/QFd3zJI7NVn63LMx PzYoL+gDiYRoqPuJ/HcsBQuP9ZP9JDQHEnopS7pdplT0HaQ74AySyWYQWdMbHssSvM hA8FLtKQnnqSEQCJ1s3LXBxFfjWMd1arydqFl2ssZssN9V/Fv7GCqIAxHzpuR7JF8K /SxY9PHmaWJ3djBpl6ncH+JvrfRCSHNcfNDsnuKprN2N6wg4zUg98kVJTKZuF3gPMC Mafzor6S8T7Iw== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 05/20] mips: signal: move sigcontext declarations to header Date: Mon, 4 Dec 2023 12:56:55 +0100 Message-Id: <20231204115710.2247097-6-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann Function declarations should be in a shared header to ensure the prototypes match the definition: arch/mips/kernel/signal.c:439:5: error: no previous prototype for 'setup_sigcontext' [-Werror=missing-prototypes] arch/mips/kernel/signal.c:516:5: error: no previous prototype for 'restore_sigcontext' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/kernel/signal-common.h | 3 +++ arch/mips/kernel/signal_n32.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index f50d48435c68..136eb20ac024 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h @@ -40,4 +40,7 @@ _restore_fp_context(void __user *fpregs, void __user *csr); extern asmlinkage int _save_msa_all_upper(void __user *buf); extern asmlinkage int _restore_msa_all_upper(void __user *buf); +extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); +extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); + #endif /* __SIGNAL_COMMON_H */ diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index ff2043d620ba..139d2596b0d4 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c @@ -33,9 +33,6 @@ */ #define __NR_N32_restart_syscall 6214 -extern int setup_sigcontext(struct pt_regs *, struct sigcontext __user *); -extern int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); - struct ucontextn32 { u32 uc_flags; s32 uc_link; From patchwork Mon Dec 4 11:56:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478235 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58DAB22EFC for ; Mon, 4 Dec 2023 11:57:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YYju0IOl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACC81C433CA; Mon, 4 Dec 2023 11:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691051; bh=l3hz5mRSkD7DYuIne0Jscf5nMuXOjPSpfpHitUXLfNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YYju0IOlb2TZrxG39W4fehNxMRmqlATtHntDxpY+g2sbOW2vqYsLSabsIN85X2IKB 522QAmTLBVu3ccT3mp1eO35f9ihoS8ikt6C71Q7laTkABSBmgOze/5ZU1siNfxrL61 wLZhksMb3BVJ1GH/1CER0bvdgTak3ycLpRy4a1X8N4smggealQfRClDU4Z+/HXv4As YHsH3CJxKh7SbOhBmpVJXnmDXpcblovN3gQzGtQrReuy+QcI1koELRFD76t4ZHnpSF WzoaLZrAxPg5gTIHb8aiBU/X04pEQnBdaV/eN8tzdncKEhW0gIHqFIGcHZJShlFico Opnidked/E+qA== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 06/20] mips: mark local function static if possible Date: Mon, 4 Dec 2023 12:56:56 +0100 Message-Id: <20231204115710.2247097-7-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann These two functions are global but have no extern prototypes or other callers, so it's best to mark them as static, avoiding these warnings: arch/mips/kernel/mips-cm.c:204:13: error: no previous prototype for '__mips_cm_l2sync_phys_base' [-Werror=missing-prototypes] arch/mips/mm/c-r4k.c:1827:12: error: no previous prototype for 'r4k_cache_init_pm' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/kernel/mips-cm.c | 2 +- arch/mips/mm/c-r4k.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c index 3f00788b0871..84b3affb9de8 100644 --- a/arch/mips/kernel/mips-cm.c +++ b/arch/mips/kernel/mips-cm.c @@ -201,7 +201,7 @@ phys_addr_t __mips_cm_phys_base(void) phys_addr_t mips_cm_phys_base(void) __attribute__((weak, alias("__mips_cm_phys_base"))); -phys_addr_t __mips_cm_l2sync_phys_base(void) +static phys_addr_t __mips_cm_l2sync_phys_base(void) { u32 base_reg; diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 187d1c16361c..0619e5296ff3 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -1828,7 +1828,7 @@ static struct notifier_block r4k_cache_pm_notifier_block = { .notifier_call = r4k_cache_pm_notifier, }; -int __init r4k_cache_init_pm(void) +static int __init r4k_cache_init_pm(void) { return cpu_pm_register_notifier(&r4k_cache_pm_notifier_block); } From patchwork Mon Dec 4 11:56:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478236 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F54822EFC for ; Mon, 4 Dec 2023 11:57:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cODGOLl9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DEBBC433C9; Mon, 4 Dec 2023 11:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691053; bh=z4zTk3CFfY1MGmK1f12Tfq9m5AIiq4yOUL5+WPN+Gys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cODGOLl96hF2fMQuvWNXpIGHYoQzt9fWAatg6+BNPuHZnwJ68CuLR53MQL+varhML GlBKYYHvIrAUXdJ8R9bGTKLkSuGuwg5u4dO96dIuofZL0rQXRzxDxRzB6pvVrFQ9V3 bWNLnEJrLD2v654rNAKTT5PZ9D2L5Z3B/kXuD6+1DAbc1Q28LlG2rHtj4iIOEpDgDF o8vBqd1uB3MvkFFG0iZPGoNetO4Q7aUCGci9AZr8gKlNtKqeierpE2SGTYeMM+T2i9 P2hF8rd3l9mXz/uycj/77GeKbsrM/1EhBEVIw+nqnMiTt8tMkyDOWtCJNs8VwNxsLC 40ACTDpfKXtgA== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 07/20] mips: move build_tlb_refill_handler() prototype Date: Mon, 4 Dec 2023 12:56:57 +0100 Message-Id: <20231204115710.2247097-8-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann Instead of having a declaration for each caller, have one that is shared with the function definition, which avoids a warning: arch/mips/mm/tlbex.c:2547:6: error: no previous prototype for 'build_tlb_refill_handler' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/tlbex.h | 1 + arch/mips/mm/tlb-r3k.c | 3 +-- arch/mips/mm/tlb-r4k.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/mips/include/asm/tlbex.h b/arch/mips/include/asm/tlbex.h index 6d97e23f30ab..24a2d06cc1c3 100644 --- a/arch/mips/include/asm/tlbex.h +++ b/arch/mips/include/asm/tlbex.h @@ -23,6 +23,7 @@ void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep); void build_tlb_write_entry(u32 **p, struct uasm_label **l, struct uasm_reloc **r, enum tlb_write_entry wmode); +void build_tlb_refill_handler(void); extern void handle_tlbl(void); extern char handle_tlbl_end[]; diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c index 53dfa2b9316b..1fb2cf8c8bfa 100644 --- a/arch/mips/mm/tlb-r3k.c +++ b/arch/mips/mm/tlb-r3k.c @@ -23,11 +23,10 @@ #include #include #include +#include #undef DEBUG_TLB -extern void build_tlb_refill_handler(void); - /* CP0 hazard avoidance. */ #define BARRIER \ __asm__ __volatile__( \ diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 93c2d695588a..a542b255019a 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -22,10 +22,9 @@ #include #include #include +#include #include -extern void build_tlb_refill_handler(void); - /* * LOONGSON-2 has a 4 entry itlb which is a subset of jtlb, LOONGSON-3 has * a 4 entry itlb and a 4 entry dtlb which are subsets of jtlb. Unfortunately, From patchwork Mon Dec 4 11:56:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478237 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C18B22EFC for ; Mon, 4 Dec 2023 11:57:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e0b2PVdL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9769AC433CC; Mon, 4 Dec 2023 11:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691055; bh=SyiutF6r1lYIBhrZamcCKmSjbvADpqrs+8irYVNoqts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e0b2PVdLqrFPaIeHzatnB0JuZ9dTmwindq3FicXcUcWOKG2XetUUX+fgOaPU6zWE3 wwaVaQM6qkPhyo6ZQGmK8EsRLF/7hL7pe7Mo9Fzqabdq083ZidoFeptc55i4cXo8+2 AHLLhkPeFGeE8RjrA1GRn1pGavgJ0BAcAxWxcVvUPDaPuKG4M5CPlMg5B1FyQ/965O wQZP+CGclMW5ZTGn+BC25vOJ/95gsZCnD14DJYhzyQM5xxNtrm4JoyHczPeojyb3Oq CvegkX/CPWsFhq5iNEau5i6tm2sU+iKZuWikhNVwBRUSf7Rh+eM/aZzjT19MUSscWx 1SWSG4K+pG0XQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 08/20] mips: move jump_label_apply_nops() declaration to header Date: Mon, 4 Dec 2023 12:56:58 +0100 Message-Id: <20231204115710.2247097-9-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann Instead of an extern declaration in the C file with the caller, move it to an appropriate header, avoiding arch/mips/kernel/jump_label.c:93:6: error: no previous prototype for 'jump_label_apply_nops' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/jump_label.h | 3 +++ arch/mips/kernel/module.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h index c5c6864e64bc..081be98c71ef 100644 --- a/arch/mips/include/asm/jump_label.h +++ b/arch/mips/include/asm/jump_label.h @@ -15,6 +15,9 @@ #include #include +struct module; +extern void jump_label_apply_nops(struct module *mod); + #define JUMP_LABEL_NOP_SIZE 4 #ifdef CONFIG_64BIT diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index 0c936cbf20c5..7b2fbaa9cac5 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c @@ -20,8 +20,7 @@ #include #include #include - -extern void jump_label_apply_nops(struct module *mod); +#include struct mips_hi16 { struct mips_hi16 *next; From patchwork Mon Dec 4 11:56:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478238 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A048F22EFC for ; Mon, 4 Dec 2023 11:57:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WIT8BTac" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92487C433CD; Mon, 4 Dec 2023 11:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691057; bh=4ABSoMNpXusCcWYdVc/Z/1r0KMCswnYJODyq0pzAGhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WIT8BTacH9XtFOb5K998EObxet0tpmzMtldqSatFkYdP4SGnNqZBjAFqqU1HrcA5M NlhZr6RXfYTWdTC+oSNYp67XxNgFeeVIlCBBw6PvI5hvaj68vJfCwIzjS1cz4PB7Q1 u3Es51WnXfwdvHS9HTJtmvbq4vWabWEZnA7B/9h8KbRFZrUZ2cUE3qcgXCJ0/s9XpV DZkOcbSVcBAWeOoM0Ry93dLlc85Dalpjj/S9cfJ1/YQA0KuAZ036Ho834gh9QDPft/ 9K+wjJguaXKveLxXDp8jFFPCWZS6DpfthsMRwn8HuUm5N7zCmwr9ZJSbhJmWs+0c+k L55zu4Gx39PdA== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 09/20] mips: unhide uasm_in_compat_space_p() declaration Date: Mon, 4 Dec 2023 12:56:59 +0100 Message-Id: <20231204115710.2247097-10-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann uasm_in_compat_space_p() has a conditional declaration but is defined unconditionally because of another local user, which causes a warning: arch/mips/mm/uasm.c:421:5: error: no previous prototype for 'uasm_in_compat_space_p' [-Werror=missing-prototypes] Make the declaration unconditional to avoid this. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/uasm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index 296bcf31abb5..b43bfd445252 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h @@ -193,9 +193,7 @@ struct uasm_label { void uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); -#ifdef CONFIG_64BIT int uasm_in_compat_space_p(long addr); -#endif int uasm_rel_hi(long val); int uasm_rel_lo(long val); void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); From patchwork Mon Dec 4 11:57:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478239 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B03022EFC for ; Mon, 4 Dec 2023 11:57:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R+jHt4x+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83113C43391; Mon, 4 Dec 2023 11:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691059; bh=f7mPCoikKyAxX+kfcbgmRu4ug6L+LPkQ+dYSgFSXlPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R+jHt4x+nSEjuW01cDgKtc9kiRiD2SdnQ0deE6o2yur28Abjmd+mteEoC5EX5hGYl WwFf/aGQVD7cK/QNkEYiN2WyIMOok0CAP+bRzshMJUq+JV8FxNybIS4RfUq9ps+DYs b0KEPHDDdWJLzI/IlcQCKKmWHbUoW3AY07f8caszW3as77BaEC8i5d7Q+s7K1lf6U+ iJKZZdhyVcbP155OJL2U89uctz+E6AZSSAVd17wBQs6VU2MygoB4w9nuYd2s9dv4Cu lPyBn7eLiYjo8ENI57IXmZLxMjO3KZKCvEmFJp2UyEQRiY6uwEj2+OQa6Ixd2T7fBI ASP0AAnjxrYIQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 10/20] mips: fix setup_zero_pages() prototype Date: Mon, 4 Dec 2023 12:57:00 +0100 Message-Id: <20231204115710.2247097-11-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann setup_zero_pages() has a local declaration in a platform specific header, but that is not seen in the file it is defined in: arch/mips/mm/init.c:60:6: error: no previous prototype for 'setup_zero_pages' [-Werror=missing-prototypes] Move it to the corresponding global header and include that where needed. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/mach-loongson64/mmzone.h | 1 - arch/mips/include/asm/mmzone.h | 2 ++ arch/mips/mm/init.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/mach-loongson64/mmzone.h b/arch/mips/include/asm/mach-loongson64/mmzone.h index ebb1deaa77b9..a3d65d37b8b5 100644 --- a/arch/mips/include/asm/mach-loongson64/mmzone.h +++ b/arch/mips/include/asm/mach-loongson64/mmzone.h @@ -18,7 +18,6 @@ extern struct pglist_data *__node_data[]; #define NODE_DATA(n) (__node_data[n]) -extern void setup_zero_pages(void); extern void __init prom_init_numa_memory(void); #endif /* _ASM_MACH_MMZONE_H */ diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h index 602a21aee9d4..14226ea42036 100644 --- a/arch/mips/include/asm/mmzone.h +++ b/arch/mips/include/asm/mmzone.h @@ -20,4 +20,6 @@ #define nid_to_addrbase(nid) 0 #endif +extern void setup_zero_pages(void); + #endif /* _ASM_MMZONE_H_ */ diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 5dcb525a8995..c2e0e5aebe90 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include From patchwork Mon Dec 4 11:57:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478240 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 221E122EFC for ; Mon, 4 Dec 2023 11:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O0qjci0K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 726FFC43395; Mon, 4 Dec 2023 11:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691061; bh=TN+helZA3bPv2YjKOOvsbQc10ej/I0xDQI0yWDQmgfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O0qjci0KWVyXGoGetwLAdxCbm3vMP8PwEkoyqEAI4sdba9umtQj+C0CjCz/+VCNHt 78dAPC0khV3FBaDdebhE5AVNwQldlJnkXvD8wa2BZ9TAkf+aHEpe9k7WZaU7z+Frsx 9ROjnLRKResu/hhZ8yh3uMJ1CexSrTKe+5vA6wbLE3SEG9eQgtfqTDfP0l5OVDLKOM bvQwa5x1yXV5P03JcUcfXAoi8Lmrc8ufouFNwfD9IY7hc104mQdi0pYkv0fRESsPLg R/REziphpRYuQNQ+t20SI/gYNxs0m/qKxr/a9mU0wGDJmMAKIeoDRF32GwZmHTNnqf w3cn2BNnu8jLQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 11/20] mips: fix tlb_init() prototype Date: Mon, 4 Dec 2023 12:57:01 +0100 Message-Id: <20231204115710.2247097-12-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann There are two definitions for tlb_init(), but no global declaration: arch/mips/mm/tlb-r4k.c:552:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes] arch/mips/mm/tlb-r3k.c:244:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes] Move the declaration to asm/setup.h and included it as needed. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/setup.h | 1 + arch/mips/kernel/traps.c | 2 -- arch/mips/mm/tlb-r3k.c | 1 + arch/mips/mm/tlb-r4k.c | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h index 8c56b862fd9c..4dce41138bad 100644 --- a/arch/mips/include/asm/setup.h +++ b/arch/mips/include/asm/setup.h @@ -27,5 +27,6 @@ extern unsigned long ebase; extern unsigned int hwrena; extern void per_cpu_trap_init(bool); extern void cpu_cache_init(void); +extern void tlb_init(void); #endif /* __SETUP_H */ diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 246c6a6b0261..c58c0c3c5b40 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -2157,8 +2157,6 @@ void *set_vi_handler(int n, vi_handler_t addr) return set_vi_srs_handler(n, addr, 0); } -extern void tlb_init(void); - /* * Timer interrupt */ diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c index 1fb2cf8c8bfa..f6db65410c65 100644 --- a/arch/mips/mm/tlb-r3k.c +++ b/arch/mips/mm/tlb-r3k.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #undef DEBUG_TLB diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index a542b255019a..44411b20c7ec 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -24,6 +24,7 @@ #include #include #include +#include /* * LOONGSON-2 has a 4 entry itlb which is a subset of jtlb, LOONGSON-3 has From patchwork Mon Dec 4 11:57:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478241 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 614D722EFC for ; Mon, 4 Dec 2023 11:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uSS1hvzZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CF64C433BD; Mon, 4 Dec 2023 11:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691062; bh=MEw5iEws7HKPgFQpUkltS5C9/vAjpe2nQRf3pDzn5fo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uSS1hvzZm4i02EIQ9K2HWhu2UCDfmYoG+ufH7r0E6aq8OFQKHtwQDjwO+vuLM1fyz WJXn08+guq9RVxGXT0ouuad51aJ5S3sj6Hrvrsf9F3Lmsg60uJa8X7n3ve3YwlUv50 NWu6LUjXOqah1bQddwz1DVikGtXxGzGSp1If1AYRyyB2riLMjEagHSlkH/WM2DIgDG bh7vMQN/U1TZ3dJORH5i6RhHJA/yFDFIlyg7Kz5ofMQfULdgbnfHbOJT5wBZqd380T hRMgmGZkEet9eL4M6AzILuHOW5SJnKjcgFCKRCHma6RTwuWpQ5ykn5SRlbu4bW3y1Q vOGuXMbc/wJoA== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 12/20] mips: move cache declarations into header Date: Mon, 4 Dec 2023 12:57:02 +0100 Message-Id: <20231204115710.2247097-13-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann Some of the cache functions are declared only for their callers, e.g. arch/mips/mm/c-r3k.c:28:15: error: no previous prototype for 'r3k_cache_size' [-Werror=missing-prototypes] arch/mips/mm/c-r3k.c:63:15: error: no previous prototype for 'r3k_cache_lsize' [-Werror=missing-prototypes] arch/mips/mm/c-r4k.c:1703:6: error: no previous prototype for 'r4k_cache_init' [-Werror=missing-prototypes] arch/mips/mm/sc-mips.c:255:5: error: no previous prototype for 'mips_sc_init' [-Werror=missing-prototypes] Move all the declarations to asm/cache.h and asm/r4kcache.h where they can be seen by the function definitions. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/cache.h | 6 ++++++ arch/mips/include/asm/r4kcache.h | 4 ++++ arch/mips/kernel/cpu-probe.c | 1 - arch/mips/kernel/cpu-r3k-probe.c | 1 - arch/mips/mm/c-r4k.c | 4 ---- arch/mips/mm/cache.c | 6 ------ 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/arch/mips/include/asm/cache.h b/arch/mips/include/asm/cache.h index 3424a7908c0f..8b08db3fb17a 100644 --- a/arch/mips/include/asm/cache.h +++ b/arch/mips/include/asm/cache.h @@ -17,5 +17,11 @@ #define __read_mostly __section(".data..read_mostly") extern void cache_noop(void); +extern void r3k_cache_init(void); +extern unsigned long r3k_cache_size(unsigned long); +extern unsigned long r3k_cache_lsize(unsigned long); +extern void r4k_cache_init(void); +extern void octeon_cache_init(void); +extern void au1x00_fixup_config_od(void); #endif /* _ASM_CACHE_H */ diff --git a/arch/mips/include/asm/r4kcache.h b/arch/mips/include/asm/r4kcache.h index 431a1c9d53fc..da1cd1bbdbc5 100644 --- a/arch/mips/include/asm/r4kcache.h +++ b/arch/mips/include/asm/r4kcache.h @@ -24,6 +24,10 @@ #include #include +extern void r5k_sc_init(void); +extern void rm7k_sc_init(void); +extern int mips_sc_init(void); + extern void (*r4k_blast_dcache)(void); extern void (*r4k_blast_icache)(void); diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index b406d8bfb15a..de7460c3a72e 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -179,7 +179,6 @@ void __init check_bugs32(void) static inline int cpu_has_confreg(void) { #ifdef CONFIG_CPU_R3000 - extern unsigned long r3k_cache_size(unsigned long); unsigned long size1, size2; unsigned long cfg = read_c0_conf(); diff --git a/arch/mips/kernel/cpu-r3k-probe.c b/arch/mips/kernel/cpu-r3k-probe.c index be93469c0e0e..0c826f729f75 100644 --- a/arch/mips/kernel/cpu-r3k-probe.c +++ b/arch/mips/kernel/cpu-r3k-probe.c @@ -42,7 +42,6 @@ void __init check_bugs32(void) static inline int cpu_has_confreg(void) { #ifdef CONFIG_CPU_R3000 - extern unsigned long r3k_cache_size(unsigned long); unsigned long size1, size2; unsigned long cfg = read_c0_conf(); diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 0619e5296ff3..b45bf026ee55 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -1485,10 +1485,6 @@ static void loongson3_sc_init(void) return; } -extern int r5k_sc_init(void); -extern int rm7k_sc_init(void); -extern int mips_sc_init(void); - static void setup_scache(void) { struct cpuinfo_mips *c = ¤t_cpu_data; diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 7f830634dbe7..e5d19f4a38ba 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c @@ -206,19 +206,13 @@ static inline void setup_protection_map(void) void cpu_cache_init(void) { if (cpu_has_3k_cache) { - extern void __weak r3k_cache_init(void); - r3k_cache_init(); } if (cpu_has_4k_cache) { - extern void __weak r4k_cache_init(void); - r4k_cache_init(); } if (cpu_has_octeon_cache) { - extern void __weak octeon_cache_init(void); - octeon_cache_init(); } From patchwork Mon Dec 4 11:57:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478242 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EE5322EFC for ; Mon, 4 Dec 2023 11:57:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LzcRxiI0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B065C433C8; Mon, 4 Dec 2023 11:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691064; bh=Q7aKYl16T9hR/qQEjfnP6gJmVaTl43MdZYWT4vZwXfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LzcRxiI031g/Z1uZIBzHwViMtMXVNlngq1Ad9smqiSwZpt4mon1kpcdJOzDK1U38L t9ughdAYz4mRMcsmfCQhz6dC1cHL4a+cu9ndFnyiVorg/YtvfVly2w6S0qQr2iOOIs UgzVeUp13PzUxlwhUcTG53mmeLWpfwtPR/uYmfEDlxn86sWJr3bJz5k38QYIjT7uIL vWm2IakasQKJZBcZ1KKPi2atPF5fBIHV0vh9u1FnRLfhQesYB3z7TYBg+P6Tdxnemb 2TA9B3eFMU1c0BxB/ektdBk0i4+9/i2eMBK2i+c208NKX4QbYwJSO+hcK/MFqEbF03 ilIvzwo5E4lOA== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 13/20] mips: add missing declarations Date: Mon, 4 Dec 2023 12:57:03 +0100 Message-Id: <20231204115710.2247097-14-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann These are three more functions that are only called from assembler and only need a declaration to avoid the -Wmissing-prototypes warnings: arch/mips/kernel/signal.c:904:17: error: no previous prototype for 'do_notify_resume' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:370:6: error: no previous prototype for 'show_registers' [-Werror=missing-prototypes] arch/mips/kernel/smp.c:352:17: error: no previous prototype for 'start_secondary' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/processor.h | 2 ++ arch/mips/include/asm/signal.h | 1 + arch/mips/include/asm/smp.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index ae2cd37a38f0..ca7662cc65a7 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h @@ -402,4 +402,6 @@ extern int mips_set_process_fp_mode(struct task_struct *task, #define GET_FP_MODE(task) mips_get_process_fp_mode(task) #define SET_FP_MODE(task,value) mips_set_process_fp_mode(task, value) +void show_registers(struct pt_regs *regs); + #endif /* _ASM_PROCESSOR_H */ diff --git a/arch/mips/include/asm/signal.h b/arch/mips/include/asm/signal.h index 23d6b8015c79..8de81ccef7ad 100644 --- a/arch/mips/include/asm/signal.h +++ b/arch/mips/include/asm/signal.h @@ -31,5 +31,6 @@ extern struct mips_abi mips_abi_32; extern int protected_save_fp_context(void __user *sc); extern int protected_restore_fp_context(void __user *sc); +void do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags); #endif /* _ASM_SIGNAL_H */ diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index f3b18b4a5e44..19190e413223 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h @@ -61,6 +61,8 @@ extern asmlinkage void smp_bootstrap(void); extern void calculate_cpu_foreign_map(void); +asmlinkage void start_secondary(void); + /* * this function sends a 'reschedule' IPI to another CPU. * it goes straight through and wastes no time serializing From patchwork Mon Dec 4 11:57:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478243 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46B4922EFC for ; Mon, 4 Dec 2023 11:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DfqFb3Q+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57DD1C433C7; Mon, 4 Dec 2023 11:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691066; bh=mHja8axhsHXkDaKV6E+Gy/vhO170K/x0LJkgRVpgsKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DfqFb3Q+q+KbsNMRhDvUAK/ugHVnAYEo780Lilzvxrp1kLwQ6TwUhySHx1xCppK9D 3T4HrkoiBhATuMbgGBUTVQqGY2ORlNOsIQlcxF2GAYgdAcUn+msBqkjrzLGrJWb7Xw 3TCAyEp19aUxS0bZs8zCB2XFkcjH/3UtMP6ju9VjQyFKY0pWwaQAfALuO61mvZ9rLg /cok18i/3aUmCd8mS8nbp6qYmuAcLa6IgFHwxBP5Ck1YSD4SMjQ/xjDrT8wjbZsovW VtPdLYxkYaj7RfqED2eMxE4rW5NWluFQQSYdCLo5LuH1ENd0n2EcVxKzfHz5Id44d9 4MAfQlgB3B/Ug== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 14/20] mips: spram: fix missing prototype warning for spram_config Date: Mon, 4 Dec 2023 12:57:04 +0100 Message-Id: <20231204115710.2247097-15-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann arch/mips/kernel/spram.c:194:6: error: no previous prototype for 'spram_config' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/spram.h | 2 +- arch/mips/kernel/spram.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/spram.h b/arch/mips/include/asm/spram.h index 373f2a5d495d..9f6a2cb1943a 100644 --- a/arch/mips/include/asm/spram.h +++ b/arch/mips/include/asm/spram.h @@ -3,7 +3,7 @@ #define _MIPS_SPRAM_H #if defined(CONFIG_MIPS_SPRAM) -extern __init void spram_config(void); +extern void spram_config(void); #else static inline void spram_config(void) { } #endif /* CONFIG_MIPS_SPRAM */ diff --git a/arch/mips/kernel/spram.c b/arch/mips/kernel/spram.c index d5d96214cce5..71c7e5e27567 100644 --- a/arch/mips/kernel/spram.c +++ b/arch/mips/kernel/spram.c @@ -12,6 +12,7 @@ #include #include #include +#include /* * These definitions are correct for the 24K/34K/74K SPRAM sample From patchwork Mon Dec 4 11:57:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478244 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53E1022EFC for ; Mon, 4 Dec 2023 11:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ADQLkfR6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49CD3C433CB; Mon, 4 Dec 2023 11:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691068; bh=K/hCExDh0cBht9JYKXc5uzgnRoEPgJr0wTezykOGsCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ADQLkfR6/G5iW3ZcRBZsrLpUf7s7lsovxNQBaHMvyKPYeFp0oZCVZjDtndv5cqYGU lPehDNZvpC3yAwufw5khufsbAMNoUFlNIGaI1yaBHqFuz1YaRZn4DbGi+XyYodJY4q 4FGW/Q8TD2NbPaDJTJzbPs5JocjhRDz/r10nks0EMew/v78e3FQ91HM77SxJFZmLZu K1u6XrPv6lv3yGQeOH0UHn1M2hB4siZN/MF+K3rFdNM/LfD4YlAX+aoDVXXwjSO94M 13d6FrGBXNG0XJkWcWHV+bV0VVGwbcr/kC/CzRz4CGGN3Z74yD5c5PzADvR+dGvIGu TmWWTsA/e0SSw== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 15/20] mips: mt: include asm/mips_mt.h Date: Mon, 4 Dec 2023 12:57:05 +0100 Message-Id: <20231204115710.2247097-16-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann These two functions have a global prototype but the header is not included before the function definitions: arch/mips/kernel/mips-mt.c:50:6: error: no previous prototype for 'mips_mt_regdump' [-Werror=missing-prototypes] arch/mips/kernel/mips-mt.c:159:6: error: no previous prototype for 'mips_mt_set_cpuoptions' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/kernel/mips-mt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c index f88b7919f11f..c07d64438b5b 100644 --- a/arch/mips/kernel/mips-mt.c +++ b/arch/mips/kernel/mips-mt.c @@ -19,6 +19,7 @@ #include #include #include +#include int vpelimit; From patchwork Mon Dec 4 11:57:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478245 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E375222EFC for ; Mon, 4 Dec 2023 11:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jDgmyixR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 416CEC433CA; Mon, 4 Dec 2023 11:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691070; bh=I6e6Jdsd6eFyhDh9BLUZ1O2SCcl426/1L6UNxcB9EvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDgmyixRN4sf7gYD8vVt4DZLUwhlb20yLc5VtWPWNFQvoj8+0VvqLydiBOCPyG0Y1 isQ0RKV78VcuIhioHT8TlHcGaG+6Btq89S1SapqHdQjMfcV/JGcAnMIrwT36TxRpBu eMoZV3OW66g6+CVBlEWoFZElyiaeJtc1hGX0uqv8noA3o1K9rtMpDpSR1/Al5mZQrb 4yT36qMUpu00hCWgacT1FxpI1IdMay1rj66/86cgSFl1B91NSM+sEKZmRQUOLiPrZq bwKglKYsSbljMAGaU5pdrXBebAN15jFI4Gf60NNL5aSrrxZhP6uIJlmkKVhETL8bkB W/xrMj/D6OW6Q== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 16/20] mips: remove extraneous asm-generic/iomap.h include Date: Mon, 4 Dec 2023 12:57:06 +0100 Message-Id: <20231204115710.2247097-17-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann When this file is included before defining readq(), it misses the declarations for a couple of functions that now become unusable: lib/iomap.c:156:5: warning: no previous prototype for 'ioread64_lo_hi' [-Wmissing-prototypes] lib/iomap.c:163:5: warning: no previous prototype for 'ioread64_hi_lo' [-Wmissing-prototypes] lib/iomap.c:170:5: warning: no previous prototype for 'ioread64be_lo_hi' [-Wmissing-prototypes] lib/iomap.c:178:5: warning: no previous prototype for 'ioread64be_hi_lo' [-Wmissing-prototypes] lib/iomap.c:264:6: warning: no previous prototype for 'iowrite64_lo_hi' [-Wmissing-prototypes] lib/iomap.c:272:6: warning: no previous prototype for 'iowrite64_hi_lo' [-Wmissing-prototypes] lib/iomap.c:280:6: warning: no previous prototype for 'iowrite64be_lo_hi' [-Wmissing-prototypes] lib/iomap.c:288:6: warning: no previous prototype for 'iowrite64be_hi_lo' [-Wmissing-prototypes] The file is included again later from asm-generic/io.h, so dropping the initial include statement makes it do the right thing, both for avoiding the warning and for actually providing these functions. Signed-off-by: Arnd Bergmann --- arch/mips/include/asm/io.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index b0866100baf2..85bbd967e05f 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -187,8 +187,6 @@ void iounmap(const volatile void __iomem *addr); #define ioremap_wc(offset, size) \ ioremap_prot((offset), (size), boot_cpu_data.writecombine) -#include - #if defined(CONFIG_CPU_CAVIUM_OCTEON) #define war_io_reorder_wmb() wmb() #else From patchwork Mon Dec 4 11:57:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478246 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A61F22EFC for ; Mon, 4 Dec 2023 11:57:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Io8rgrO6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 390ECC433AD; Mon, 4 Dec 2023 11:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691072; bh=XNLXB9C9iANjifHx1nMXhDMMAGyy9Qfh4bqOEZ796KI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Io8rgrO6IONkw5FdvdLvBhvUKSNRrK/QWiQKGpgJoqXoJ2squCFeHfzLDaPf5HICZ rD9evFe+7fhYFUQaycqFh8VadEs4JStBSUlWWWqassmTEO6MSgKXM+dwEdx7uXiptY RTAnjkW6LDKYBrBMbD/58lMlFjzJoKI6XuaTVSkeZQjdWhp9kr39JM3MrUdHFVaC1e iSnR1WlI3slJkVH9RrM0x6A2jWJUvXDb59se3p+pdjIbsG0KsGjzc1VR7f11gTmr2O sks6Gmbxyo6bC9WjO+u7rKWdDXN6t3f5T3iypVlVcWHModGPt1+Ohlf5oLej1fIQxV j+ATqkXkHK/Gw== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 17/20] mips: suspend: include linux/suspend.h as needed Date: Mon, 4 Dec 2023 12:57:07 +0100 Message-Id: <20231204115710.2247097-18-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann A couple of functions are defined by the architecture and declared in linux/suspend.h, but mips is lacking the corresponding #include statement before the definition: arch/mips/power/cpu.c:16:6: warning: no previous prototype for 'save_processor_state' [-Wmissing-prototypes] arch/mips/power/cpu.c:26:6: warning: no previous prototype for 'restore_processor_state' [-Wmissing-prototypes] arch/mips/power/cpu.c:36:5: warning: no previous prototype for 'pfn_is_nosave' [-Wmissing-prototypes] arch/mips/power/hibernate.c:6:5: warning: no previous prototype for 'swsusp_arch_resume' [-Wmissing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/power/cpu.c | 1 + arch/mips/power/hibernate.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/mips/power/cpu.c b/arch/mips/power/cpu.c index a15e29dfc7b3..d8ef7778e535 100644 --- a/arch/mips/power/cpu.c +++ b/arch/mips/power/cpu.c @@ -6,6 +6,7 @@ * Author: Hu Hongbing * Wu Zhangjin */ +#include #include #include #include diff --git a/arch/mips/power/hibernate.c b/arch/mips/power/hibernate.c index 94ab17c3c49d..192879e76c85 100644 --- a/arch/mips/power/hibernate.c +++ b/arch/mips/power/hibernate.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include extern int restore_image(void); From patchwork Mon Dec 4 11:57:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478247 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DADB22EFC for ; Mon, 4 Dec 2023 11:57:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B1/Iub+M" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C1F4C433D9; Mon, 4 Dec 2023 11:57:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691074; bh=NYgjZuAn4gA//7iXGm7aNkqHSnPJFETs5an0l5cgV+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B1/Iub+MSlZW1iDrUy4L08L+EbcoD1yjvG8Aph0zyPg39RTH0wo+qGKA3+K9OhOBW 4qjWG7pum7bPnoCzH/+iw0TXMVM8JC3NY7EgfYGFpu0N6iZD8W+ON5r6U3eMXk+ttc f2ah04f35h4+jIZNTFFozoSlHDGNCjluewwpi7dkEl7GkJ2Iyaxoni5qsyh7bynyin E8ihOWf0p3qyjW0K8RH13y0pjgO00NlfqKfHnSayvG8R/EoePpqxYIeXtGTTfpPKr+ IP8TSoGwNedaBIQFPyD2IkD2cvrz/M8pdc/QoKzFyIprRNu2EHuPgyfxGsd7TV1+SO WSoUZOD2wg6XA== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 18/20] mips: hide conditionally unused functions Date: Mon, 4 Dec 2023 12:57:08 +0100 Message-Id: <20231204115710.2247097-19-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann A couple of functions are defined unconditionally but have a conditional declaration: arch/mips/mm/tlb-r4k.c:461:12: error: no previous prototype for 'add_temporary_entry' [-Werror=missing-prototypes] arch/mips/mm/pgtable-64.c:92:7: error: no previous prototype for 'mk_pmd' [-Werror=missing-prototypes] arch/mips/mm/pgtable-64.c:101:6: error: no previous prototype for 'set_pmd_at' [-Werror=missing-prototypes] Since there are no callers in these configurations, add the same #ifdef checks around the definitions. Signed-off-by: Arnd Bergmann --- arch/mips/mm/pgtable-64.c | 2 ++ arch/mips/mm/tlb-r4k.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/mips/mm/pgtable-64.c b/arch/mips/mm/pgtable-64.c index c76d21f7dffb..1e544827dea9 100644 --- a/arch/mips/mm/pgtable-64.c +++ b/arch/mips/mm/pgtable-64.c @@ -89,6 +89,7 @@ void pud_init(void *addr) } #endif +#ifdef CONFIG_TRANSPARENT_HUGEPAGE pmd_t mk_pmd(struct page *page, pgprot_t prot) { pmd_t pmd; @@ -103,6 +104,7 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr, { *pmdp = pmd; } +#endif void __init pagetable_init(void) { diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 44411b20c7ec..7e2a0011a6fb 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -458,6 +458,7 @@ EXPORT_SYMBOL(has_transparent_hugepage); int temp_tlb_entry; +#ifndef CONFIG_64BIT __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, unsigned long entryhi, unsigned long pagemask) { @@ -496,6 +497,7 @@ __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, local_irq_restore(flags); return ret; } +#endif static int ntlb; static int __init set_ntlb(char *str) From patchwork Mon Dec 4 11:57:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478248 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3318C22EFC for ; Mon, 4 Dec 2023 11:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kwK3J2ny" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31B25C43397; Mon, 4 Dec 2023 11:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691076; bh=2ybd8Cw7YtU9u9EHHq/wEoKMfFc0foeXptI4v618YLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kwK3J2nyRuMO7cc5FBlkOyQQSG16HXJjEpaaGw+7p6jnWH8JfDJgQ3aRzupuj+HKJ I+Q8200Ouq+z26Ued3VzF7lulESo3RTxh/uBSoAXt01m8og1VH+yUqaXsK2186cN8P H4LJD0/LOAXq+HryzMRBKBn4i6B8pThCUKG31eo0TspSza2nH3GMr8zKzFUWe/B/dP D+pMcvarz9XNE5Eb2uDlXFlC+BV+C8HBlqr2gjbjKe06AcxFT/wqBX6UjZxsEzfEA4 1A1XeFtr+uHK8eNDjH6u4FmaZF/j66FI2sEgKFmXPZ5n93470IsO76PWFqSNOJEOak r1N4zlmIlKQSQ== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 19/20] mips: smp: fix setup_profiling_timer() prototype Date: Mon, 4 Dec 2023 12:57:09 +0100 Message-Id: <20231204115710.2247097-20-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann The function is unconditionally defined in smp.c but is conditionally declared in a header that is not included here. arch/mips/kernel/smp.c:473:5: error: no previous prototype for 'setup_profiling_timer' [-Werror=missing-prototypes] Add the missing #include and #ifdef to match the declaration. Signed-off-by: Arnd Bergmann --- arch/mips/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 8fbef537fb88..774e4dcd86d2 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -468,11 +469,13 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) return 0; } +#ifdef CONFIG_PROFILING /* Not really SMP stuff ... */ int setup_profiling_timer(unsigned int multiplier) { return 0; } +#endif static void flush_tlb_all_ipi(void *info) { From patchwork Mon Dec 4 11:57:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13478249 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD68322EFC for ; Mon, 4 Dec 2023 11:57:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sR0thcYr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2163FC433CC; Mon, 4 Dec 2023 11:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701691078; bh=FOVbSQK19msCaYkNFzSQgPAl8qoB4jWxxmWQ3PGAOHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sR0thcYrUbsQ81aSgyW9X34S+S406cMGfLPksDNE5BQc8zRtMCvJLbelJcKJRa3LW 3aIFLaU3XXTNT3EMelhYUu7Tx44s1DI61JZa2x/5a4zeqhiDO2FxtTZZnv6bCyqywf LhP0vtQ5KMKCDsTtKEWG8WL0Ef1wQToiUnGITW2HCmBzK3do0dN0Gzag5E/HaXZD2w OEy3IgT8o3ULCPev3H1kOf1Dm+GuIXhLRY2rTxA94ZKQEv37914w61CPaMMpD1D8eq O7YkFCmX8zHGZaFr3e9edlZDXjV/zk9fXrBHb093MCJTrRzPevk1t3LNdVuu2lhmZz OJm3OfOtBMqdg== From: Arnd Bergmann To: linux-mips@vger.kernel.org Cc: Arnd Bergmann , "Andrew Morton" , "Stephen Rothwell" , "Linux Kernel Mailing List" , "Thomas Bogendoerfer" Subject: [PATCH 20/20] mips: kexec: include linux/reboot.h Date: Mon, 4 Dec 2023 12:57:10 +0100 Message-Id: <20231204115710.2247097-21-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231204115710.2247097-1-arnd@kernel.org> References: <20231204115710.2247097-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann Two functions are provided for kexec, but the mips implementation is missing the corresponding #include statment: arch/mips/kernel/machine_kexec.c:136:1: error: no previous prototype for 'machine_shutdown' [-Werror=missing-prototypes] arch/mips/kernel/machine_kexec.c:152:1: error: no previous prototype for 'machine_crash_shutdown' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- arch/mips/kernel/machine_kexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c index 432bfd3e7f22..4e3579bbd620 100644 --- a/arch/mips/kernel/machine_kexec.c +++ b/arch/mips/kernel/machine_kexec.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include