From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A082EE49A8 for ; Mon, 21 Aug 2023 07:20:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231161AbjHUHUi (ORCPT ); Mon, 21 Aug 2023 03:20:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233637AbjHUHUg (ORCPT ); Mon, 21 Aug 2023 03:20:36 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9789BB; Mon, 21 Aug 2023 00:20:34 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fee600dce6so14426115e9.1; Mon, 21 Aug 2023 00:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602433; x=1693207233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kn6oyyCNhNwMLsIiGDbJPsQUMGXp0+1PeXxr+VvT0wg=; b=UQv88YtoE5sZPF6mUNw8frc6qtwL7r5qdB2m4k0j6gVJBK6uIiGHsoOoEJzI85//fE +AiXhuVLdu8/Gb6Goh19g9XZv00FJmA/R0O/PRDHqrN8KxH7bJgte9VvXlOnyU06Aijp Qi/y8kWMiv9LKEiucyko+86WGXosU43rt0euHFwM/24GmKuY2ffgZGKIQMFdTZMMlwSc Fhntcc75HYB/9JrhcFQLLPkievfyioaDSPbTojeYEolR+9S9IGiTS4UdRPnQo+Vly8jc CyyaGxiDaaJtiOG2gKAkx0zvZ1Rha7GHBE4vAi1kmL5kZ9tRvKu4/+NaJL7a4A0DrgZC HQBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602433; x=1693207233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kn6oyyCNhNwMLsIiGDbJPsQUMGXp0+1PeXxr+VvT0wg=; b=ZrntiW3xPUly0auGKkk+2R/hSR3OpMCF6Woxsga2hQ0BJNzKzJj5o25dTKPjpAgdbZ cvluQd/JDKC9voWAS9uq0VBQ40jKXy4pZob0P+btCR2yN8n7TI4JKjFSPxVGyiv1cv2v rx18Lv9jXhCpH2WqSYyGOWVw8PvFofMrwDquLM8evKYHaKA7DGNmDGFr88RP/FH+WKk1 58aIe+3tciq+cyykm83EvxrIKGBAgGb9dhz6ITs0vk77/IKcmaJReRJAwsdbF424uDUh taaRohCohUhVX6/x39e5nQ+ujoIqjw1Z2Orh9hH6WpPfGstb+9hFU46ToEdwdMnmk/Pe 8o7w== X-Gm-Message-State: AOJu0YyfZCQRNy0al9+ydyowIUdu1xMv7NPrq74PBpcKa+wYtsIukH43 nta9DrcEo8U4b5Jooq4B/IIcKYDBieI= X-Google-Smtp-Source: AGHT+IGfwEWw/dmLKC8P4KXr5T4HWzc5kIigxZAXEOnHT5IN4LRxXgvlmNKMcB9AARYAI1JYvKml4Q== X-Received: by 2002:a05:6000:12d2:b0:319:8af0:824a with SMTP id l18-20020a05600012d200b003198af0824amr4483523wrx.69.1692602432637; Mon, 21 Aug 2023 00:20:32 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id v2-20020a5d4b02000000b0031aca6cc69csm11518048wrq.2.2023.08.21.00.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:32 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Arnd Bergmann , Oleg Nesterov , Jonas Bonn , Stefan Kristiansson , Guo Ren , Palmer Dabbelt , "Peter Zijlstra (Intel)" , Valentin Schneider , Al Viro , linux-openrisc@vger.kernel.org Subject: [PATCH 1/8] openrisc: Add missing prototypes for assembly called fnctions Date: Mon, 21 Aug 2023 08:20:00 +0100 Message-Id: <20230821072007.2698186-2-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" These functions are all called from assembly files so there is no need for a prototype in a header file, but when compiling with W=3D1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/ptrace.c:191:17: error: no previous prototype for 'do_= syscall_trace_enter' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/ptrace.c:210:17: error: no previous prototype for 'do_= syscall_trace_leave' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/signal.c:293:1: error: no previous prototype for 'do_w= ork_pending' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/signal.c:68:17: error: no previous prototype for '_sys= _rt_sigreturn' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/time.c:111:25: error: no previous prototype for 'timer= _interrupt' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/traps.c:239:17: error: no previous prototype for 'unha= ndled_exception' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/traps.c:246:17: error: no previous prototype for 'do_f= pe_trap' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/traps.c:268:17: error: no previous prototype for 'do_t= rap' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/traps.c:273:17: error: no previous prototype for 'do_u= naligned_access' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/traps.c:286:17: error: no previous prototype for 'do_b= us_fault' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/traps.c:462:17: error: no previous prototype for 'do_i= llegal_instruction' [-Werror=3Dmissing-prototypes] arch/openrisc/mm/fault.c:44:17: error: no previous prototype for 'do_page_f= ault' [-Werror=3Dmissing-prototypes] Since these are not needed in header files, fix these by adding prototypes to the top of the respective C files. Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd= @kernel.org/ Signed-off-by: Stafford Horne --- arch/openrisc/kernel/ptrace.c | 4 ++++ arch/openrisc/kernel/signal.c | 5 +++++ arch/openrisc/kernel/smp.c | 2 ++ arch/openrisc/kernel/time.c | 2 ++ arch/openrisc/kernel/traps.c | 8 ++++++++ arch/openrisc/mm/fault.c | 3 +++ 6 files changed, 24 insertions(+) diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index 0b7d2ca6ba3b..1eeac3b62e9d 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c @@ -27,6 +27,10 @@ #include #include =20 +asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); + +asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); + /* * Copy the thread state to a regset that can be interpreted by userspace. * diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c index 2e7257a433ff..3fbf00330043 100644 --- a/arch/openrisc/kernel/signal.c +++ b/arch/openrisc/kernel/signal.c @@ -34,6 +34,11 @@ struct rt_sigframe { unsigned char retcode[16]; /* trampoline code */ }; =20 +asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs); + +asmlinkage int do_work_pending(struct pt_regs *regs, unsigned int thread_f= lags, + int syscall); + static int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) { diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c index 0a7a059e2dff..1c5a2d71d675 100644 --- a/arch/openrisc/kernel/smp.c +++ b/arch/openrisc/kernel/smp.c @@ -23,6 +23,8 @@ #include #include =20 +asmlinkage __init void secondary_start_kernel(void); + static void (*smp_cross_call)(const struct cpumask *, unsigned int); =20 unsigned long secondary_release =3D -1; diff --git a/arch/openrisc/kernel/time.c b/arch/openrisc/kernel/time.c index 8e26c1af5441..764c7bfb5df3 100644 --- a/arch/openrisc/kernel/time.c +++ b/arch/openrisc/kernel/time.c @@ -25,6 +25,8 @@ #include #include =20 +irqreturn_t __irq_entry timer_interrupt(struct pt_regs *regs); + /* Test the timer ticks to count, used in sync routine */ inline void openrisc_timer_set(unsigned long count) { diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c index 0aa6b07efda1..afa47501118f 100644 --- a/arch/openrisc/kernel/traps.c +++ b/arch/openrisc/kernel/traps.c @@ -38,6 +38,14 @@ static int kstack_depth_to_print =3D 0x180; int lwa_flag; static unsigned long __user *lwa_addr; =20 +asmlinkage void unhandled_exception(struct pt_regs *regs, int ea, int vect= or); +asmlinkage void do_trap(struct pt_regs *regs, unsigned long address); +asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address); +asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long ad= dress); +asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address); +asmlinkage void do_illegal_instruction(struct pt_regs *regs, + unsigned long address); + static void print_trace(void *data, unsigned long addr, int reliable) { const char *loglvl =3D data; diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c index a9dcd4381d1a..01dc18aa8410 100644 --- a/arch/openrisc/mm/fault.c +++ b/arch/openrisc/mm/fault.c @@ -32,6 +32,9 @@ volatile pgd_t *current_pgd[NR_CPUS]; =20 extern void __noreturn die(char *, struct pt_regs *, long); =20 +asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address, + unsigned long vector, int write_acc); + /* * This routine handles page faults. It determines the address, * and the problem, and then passes it off to one of the appropriate --=20 2.39.1 From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0217EE49AB for ; Mon, 21 Aug 2023 07:20:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233653AbjHUHUk (ORCPT ); Mon, 21 Aug 2023 03:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233640AbjHUHUi (ORCPT ); Mon, 21 Aug 2023 03:20:38 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9127C4; Mon, 21 Aug 2023 00:20:36 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3fee5ddc23eso15464045e9.1; Mon, 21 Aug 2023 00:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602435; x=1693207235; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eUA014eiWMc0O0JO4ua0VCD3sT2u+1P98fzdR5PzPH8=; b=hrV6y9Y4dx8RklS/Z2n9y9X7NlJo6mGbDEDvSRy+dMOqGGwyvxJKHygvZ0NzxrRdyS i6zVfmR+JtTU9AZUy71gIB/Huf3ADcwTXtEhpDjUXrnixIR8EWqq8o/HCZ7TSxECw5qN VPYXOlyZr1XMSf+q7jS3xjXgaiGfO7mhcgIjKhkUlK++wPsVnVe/s37MvqGYoKpBPMMy gCmuLrpSR2vtAyBXECpEOr3BXyJuIbL/jLF00GmPCGdOalqIqyErcsqzUIKgbrnoudKC 6nDai9ZzXQqWTOqg23j+tWuIenR1VnjpHsaPVsQ0vRDQIq+lrgW6ovEt5uSHYuo8+pBS wyFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602435; x=1693207235; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eUA014eiWMc0O0JO4ua0VCD3sT2u+1P98fzdR5PzPH8=; b=VeFd7hVVIlRLAIhnxrUbKycubDOODQgemY1SlbCCuJ4ZMrn/KZUrhAQJ8IshATxUT/ swIEHe0x11ERvcSom62lhlZCQk58un8Jgu7DhobcIYjA0wGVr7sWZAb/rsUTJW695s4O iS/gga2cy/vM7j4t4LVvNbRjhVnQdf32qZ37nBm5TCNA5AAeRw7lhJwLyqTl7aF5Bshk hDlvWL9QD0NMaBXkI6Rqsqu9Gbd7f9+hlNQREeeno3CG7QqsF3XuCmk9cn87la4FYtYm OlBjmiOBZfcopDYdFLUrzReAnyxXjlzP5xoL3fropA/oNkhsrZe8uFSQv3Y4qc4wamEU tXlA== X-Gm-Message-State: AOJu0YwAMsV0KnSxADjIWDk0P8D8/qftF51REQ3zEyDuWApPYYQG6g/c JzUk/sSpLrxNjB0BSHb0pBiCqoFmxT8= X-Google-Smtp-Source: AGHT+IE/heFB8YigTjGWNTnSsUs6UiPutLTuNhNpgXY36woxvXu5tPhC0sVP5RnWvOOyeuSSB9+foA== X-Received: by 2002:a1c:f716:0:b0:3fb:df34:176e with SMTP id v22-20020a1cf716000000b003fbdf34176emr4110237wmh.31.1692602434677; Mon, 21 Aug 2023 00:20:34 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id p7-20020a7bcc87000000b003fee6e170f9sm6975677wma.45.2023.08.21.00.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:34 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Arnd Bergmann , Jonas Bonn , Stefan Kristiansson , linux-openrisc@vger.kernel.org Subject: [PATCH 2/8] openrisc: Declare do_signal function as static Date: Mon, 21 Aug 2023 08:20:01 +0100 Message-Id: <20230821072007.2698186-3-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When compiling with W=3D1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/signal.c:227:5: error: no previous prototype for 'do= _signal' [-Werror=3Dmissing-prototypes] Fix this by declaring the function a static as it is not used outside of the scope of this file. Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd= @kernel.org/ Signed-off-by: Stafford Horne --- arch/openrisc/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c index 3fbf00330043..e2f21a5d8ad9 100644 --- a/arch/openrisc/kernel/signal.c +++ b/arch/openrisc/kernel/signal.c @@ -229,7 +229,7 @@ handle_signal(struct ksignal *ksig, struct pt_regs *reg= s) * mode below. */ =20 -int do_signal(struct pt_regs *regs, int syscall) +static int do_signal(struct pt_regs *regs, int syscall) { struct ksignal ksig; unsigned long continue_addr =3D 0; --=20 2.39.1 From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50F24EE4993 for ; Mon, 21 Aug 2023 07:20:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233646AbjHUHUv (ORCPT ); Mon, 21 Aug 2023 03:20:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233640AbjHUHUt (ORCPT ); Mon, 21 Aug 2023 03:20:49 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D608EB8; Mon, 21 Aug 2023 00:20:40 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3fef4b063a7so565125e9.2; Mon, 21 Aug 2023 00:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602439; x=1693207239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bEZTCW4anOz4OA529ZQF56jnwgreyTMpd9DmGcQ5jUU=; b=lhmQZrs0yQ1HRpbiCUMVRfrRMaiXK3K2sOx4VStllc7MHh9Wu0mR9QeyfxntSqJZjK HhpK/MZsNIYy2+nyfXiW5XsSixD7qktSn8+SCZaELkDsKiq39SQJuZb/LnJknt/GzGzM yeoXmIO4XdrQMSfvrGS41434/SmgViAiudCPtzsf2Zv9OSoC39AATnuJYcLfarTMB8IV rPAVvccvFJGvk2M+6xkyIcVn8hCeMBOgELnOMKCfsR/3TJpy8Bl6xe/6vWKg6tB8Lbx+ v/fGelmD1syho0mpuoC7pZTwyu94s/JgGDUDz7CeAoW1JgE+2ZksFYTbtl6qE0UkPhrd 8Ldg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602439; x=1693207239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bEZTCW4anOz4OA529ZQF56jnwgreyTMpd9DmGcQ5jUU=; b=WOq+to6OgwtCtOc5cr2hH8T62hz1bFGEnYX10Pm+GFJNg9tSIrbLbyxul4oCLh4U/F t/s0mQIvtqh501iV3azThza+t7e3GNl7NFhYkRqg08UawtPpJhaNTxKje1U5N5B9buk4 pIvbWU+7EGi5FQ+EzirBxJA0AwfQSq65icrT2om1+9rUMzxSVTVtmjIEltYAiwdL8OLN CfWZwoYKsDRpu4thtH+hzTzZvsJ2Brle6DqwJmTxQJDjPd3TVUuGKFhXxCPZJXCR20uk c/+6ZqnGcgTWelMI8pEYwoQ8ag+jyWDYJ57dkLgGRtNav0aimTCnL2YGHq3dAkmTUbIw frCg== X-Gm-Message-State: AOJu0YyPEgMLyMzy28dh4RUsyP1hw/7x8GvVteTW1VkJRhIFRUKIRM1o OpsXj+7NsmqFJl6A1lf5pR9/njEGet/ZKw== X-Google-Smtp-Source: AGHT+IECs4tjcEI/bx4VE8zC6AyLsiXDQbQNyNsMPkKvHCq7CeNg6z49JntwUh44hsMJN4gPg8jCeQ== X-Received: by 2002:a05:600c:3646:b0:3fe:d448:511d with SMTP id y6-20020a05600c364600b003fed448511dmr4638679wmq.6.1692602438488; Mon, 21 Aug 2023 00:20:38 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id e11-20020a5d65cb000000b0031416362e23sm11631594wrw.3.2023.08.21.00.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:38 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Arnd Bergmann , Jonas Bonn , Stefan Kristiansson , Geert Uytterhoeven , Michael Ellerman , Catalin Marinas , Guo Ren , Kefeng Wang , Frederic Weisbecker , "Gautham R. Shenoy" , Peter Zijlstra , linux-openrisc@vger.kernel.org Subject: [PATCH 3/8] openrisc: Add prototype for show_registers to processor.h Date: Mon, 21 Aug 2023 08:20:02 +0100 Message-Id: <20230821072007.2698186-4-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When compiling with W=3D1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/traps.c:67:6: error: no previous prototype for 'show= _registers' [-Werror=3Dmissing-prototypes] Fix by adding the prototype to the appropriate header file and including the header file in the appropriate C files. Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd= @kernel.org/ Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/processor.h | 1 + arch/openrisc/kernel/process.c | 2 -- arch/openrisc/kernel/traps.c | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/= asm/processor.h index ed9efb430afa..3b736e74e6ed 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h @@ -73,6 +73,7 @@ struct thread_struct { =20 void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long s= p); unsigned long __get_wchan(struct task_struct *p); +void show_registers(struct pt_regs *regs); =20 #define cpu_relax() barrier() =20 diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index dfa558f98ed8..a07512de0169 100644 --- a/arch/openrisc/kernel/process.c +++ b/arch/openrisc/kernel/process.c @@ -119,8 +119,6 @@ void flush_thread(void) =20 void show_regs(struct pt_regs *regs) { - extern void show_registers(struct pt_regs *regs); - show_regs_print_info(KERN_DEFAULT); /* __PHX__ cleanup this mess */ show_registers(regs); diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c index afa47501118f..f221e4b4298f 100644 --- a/arch/openrisc/kernel/traps.c +++ b/arch/openrisc/kernel/traps.c @@ -31,6 +31,7 @@ #include =20 #include +#include #include #include =20 --=20 2.39.1 From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64001EE49A8 for ; Mon, 21 Aug 2023 07:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233661AbjHUHVS (ORCPT ); Mon, 21 Aug 2023 03:21:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231967AbjHUHVQ (ORCPT ); Mon, 21 Aug 2023 03:21:16 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09E6AD9; Mon, 21 Aug 2023 00:20:51 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fe9c20f449so28626225e9.3; Mon, 21 Aug 2023 00:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602449; x=1693207249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PtNc3Du6gG8oZnZl3Qw+qjBjvlHx+WfMztJOy5nnEYA=; b=flSrl4IhE/aUkCSW53h+QGujT6TMqRPEtcAmrnwkcbq5EKxiqkUjCC9zkQdiyWulh/ g4lYjTt1WzbE6kbMD8yWjedfzxcN5/Ete9q87nvLXKQ3+as9DtD5R+m1hbWX98iDJH5D 6BwWTVBlKlAOChBNPvwQ5BunkahRUnn16nJX7CvZoSsCel1qjUEUOXJd3Y9pufic8ppr SMGwA5Ma5OuD9AygpHtt/bSouaxdHtiKOUiSYDmoGZ7TDdwrw/xhnyuV/JYCUSx5cybI BMN0l/EHTeORdmqp4RFvXQwFw7FBhRw7LuqMRcggD3wwoVkxoieXcIkeFeP7Qm/Ta3Pq lEdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602449; x=1693207249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PtNc3Du6gG8oZnZl3Qw+qjBjvlHx+WfMztJOy5nnEYA=; b=JnTUjgT8WvjXLAb4PjJBBFZAN5MH1gu0ObC7F5IOSEu6kvqOR5fM3eKU65kszl1auZ Uwt/9L+NsWxldde/BB88p8NQSVJyn3ia/lHaJYLpfWLszCE05bUKzYq69mnhqtfAgC+B pQPYt/Y9jzpy00/JY+s1yFUs0ectTO5TCLAMxodjQ/gqdGy+u1eAsgtAceXmk5LeMZRg /EQpecBYq6s0e8O5tLPEtS7Vr58qBwIARIpH0aVyxowlh+e8YidokK/ghWSMcyXoBgbP bA14iG5oF0UoxTUeA79QQ/eBv6mXYjXAQ8PUBbcCPDmF/C3gjWmwvFZDV34gBRN2hybN RUcw== X-Gm-Message-State: AOJu0YyAZlfQXHfg1OB2WPq5hUG1N5fLjvu7jqjXQ0jvw4CGiOIx7Xob /+pWGLrDsp4DN8IfEKfogbXwOQhhNjImtA== X-Google-Smtp-Source: AGHT+IFFy6kyYsxl8K+nHlrUjEOUrHB710r1vOeQWaLqJHkdQQgstcQsIuxtrYX+JYb4wdy0gDGkXw== X-Received: by 2002:a05:600c:22cf:b0:3fb:fea1:affa with SMTP id 15-20020a05600c22cf00b003fbfea1affamr4656031wmg.37.1692602449077; Mon, 21 Aug 2023 00:20:49 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id 10-20020a05600c228a00b003fe4ca8decdsm15317688wmf.31.2023.08.21.00.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:48 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Arnd Bergmann , Jonas Bonn , Stefan Kristiansson , Al Viro , linux-openrisc@vger.kernel.org Subject: [PATCH 4/8] openrisc: Add prototype for die to bug.h Date: Mon, 21 Aug 2023 08:20:03 +0100 Message-Id: <20230821072007.2698186-5-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When compiling with W=3D1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/traps.c:221:17: sing-prototypesrror: no previous pro= totype for 'die' [-Werror=3Dmissing-prototypes] Fix by adding the prototype to the appropriate header file and including the header file in the appropriate C files. Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd= @kernel.org/ Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/bug.h | 11 +++++++++++ arch/openrisc/kernel/traps.c | 1 + arch/openrisc/mm/fault.c | 3 +-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 arch/openrisc/include/asm/bug.h diff --git a/arch/openrisc/include/asm/bug.h b/arch/openrisc/include/asm/bu= g.h new file mode 100644 index 000000000000..6d04776eaf10 --- /dev/null +++ b/arch/openrisc/include/asm/bug.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_OPENRISC_BUG_H +#define __ASM_OPENRISC_BUG_H + +#include + +struct pt_regs; + +void __noreturn die(const char *str, struct pt_regs *regs, long err); + +#endif /* __ASM_OPENRISC_BUG_H */ diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c index f221e4b4298f..879fbf57c04e 100644 --- a/arch/openrisc/kernel/traps.c +++ b/arch/openrisc/kernel/traps.c @@ -30,6 +30,7 @@ #include #include =20 +#include #include #include #include diff --git a/arch/openrisc/mm/fault.c b/arch/openrisc/mm/fault.c index 01dc18aa8410..29e232d78d82 100644 --- a/arch/openrisc/mm/fault.c +++ b/arch/openrisc/mm/fault.c @@ -18,6 +18,7 @@ #include =20 #include +#include #include #include #include @@ -30,8 +31,6 @@ */ volatile pgd_t *current_pgd[NR_CPUS]; =20 -extern void __noreturn die(char *, struct pt_regs *, long); - asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address, unsigned long vector, int write_acc); =20 --=20 2.39.1 From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD9A1EE49A5 for ; Mon, 21 Aug 2023 07:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233672AbjHUHVX (ORCPT ); Mon, 21 Aug 2023 03:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233663AbjHUHVV (ORCPT ); Mon, 21 Aug 2023 03:21:21 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98A84121; Mon, 21 Aug 2023 00:20:53 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b9c907bc68so51517011fa.2; Mon, 21 Aug 2023 00:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602451; x=1693207251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nq36Dbq1HY2z5NlqPV7zgKLt6oReU56/omua8/ySzLI=; b=cgcU6UqwnSLtbvAZe/OZa5h/lTndnLn8O/4Ozbeb20OgiKvvNVTDOK66QNWTko5H6H PND1VdxYMH/aVh3SlzZb9XCjvbT4WSJePbYzgLjfgjv6jp8N592qbI5NAPtH+AhK92F0 ggVeNvoR4EMf769CU6ziBs1oiwtrMyRlTu9YJWQELlI0ZKckqmDTALNgpDy3/1nIDdsZ /bjch+vLfgCV3rfOoaxCHmdDMiltpHXStGGGEIHRUaIk4d0KhX8ilq6pAPE7WJJ+FlaM 4aq4N/5sdsJNuA+hS3AV3IF12ORfCaJEf9DyE40c1Qs5OkaURHxrppIEVrDT9B49Tv48 jKVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602451; x=1693207251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nq36Dbq1HY2z5NlqPV7zgKLt6oReU56/omua8/ySzLI=; b=Nsxhl1IIReoFwXnqPfHrZO12X5eYhSFQeqYGf7vMG9gmziNSBh0pTg3HGdYI3oQUu0 29MPYYIIua/jTurlBIWmgjNMHs/ELSsBdQkVTn+DUZlKx3p3vm05LWIQr3BeGRBqD1hq jp7w5kuiDHv1NYyuaVh2IyoDtmFeWI8DSqdzoDB5+rr2k46D4hTLEkm3w63+tLHROtLr 6YBtEIFC0DGdX7w09iVgDl713Yc5gl5euKaXba6anaKZyeG1bQnjB/gQaVWwCi8R9fp+ JLDu7xoaC8oBYlTHOP/q+dNKBFEHzQh455m90RRYdNAs3jUJurJvQ+x2CcjgUFKJ2zH5 Lobw== X-Gm-Message-State: AOJu0Yx4+fWLUSwnemRKetuTV6Kc8wiWlskcmbGtj/x4yKJIYx4t6d3t HUD+PmkB+5R0ei2l2lFT09wtboP+pTD3+g== X-Google-Smtp-Source: AGHT+IE6lprPnniAsTnl0nA7dumKbexfHrUUAM9JOPQzP46HU8eo3vXedEKxbWQlOJKWYViJAMU90g== X-Received: by 2002:a05:6512:1081:b0:4fb:8f79:631 with SMTP id j1-20020a056512108100b004fb8f790631mr3856240lfg.46.1692602450988; Mon, 21 Aug 2023 00:20:50 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id 21-20020a05600c22d500b003fee777fd84sm6769656wmg.41.2023.08.21.00.20.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:50 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Arnd Bergmann , Jonas Bonn , Stefan Kristiansson , Guo Ren , Kefeng Wang , Frederic Weisbecker , "Gautham R. Shenoy" , Peter Zijlstra , linux-openrisc@vger.kernel.org Subject: [PATCH 5/8] openrisc: Include cpu.h and switch_to.h for prototypes Date: Mon, 21 Aug 2023 08:20:04 +0100 Message-Id: <20230821072007.2698186-6-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When compiling with W=3D1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/process.c:100:6: error: no previous prototype for 'a= rch_cpu_idle' [-Werror=3Dmissing-prototypes] arch/openrisc/kernel/process.c:240:21: error: no previous prototype for '= __switch_to' [-Werror=3Dmissing-prototypes] Fix these by adding the approrpiate header files to process.c which brings in the prototype definitions. Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd= @kernel.org/ Signed-off-by: Stafford Horne --- arch/openrisc/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index a07512de0169..86e02929f3ac 100644 --- a/arch/openrisc/kernel/process.c +++ b/arch/openrisc/kernel/process.c @@ -14,6 +14,7 @@ */ =20 #define __KERNEL_SYSCALLS__ +#include #include #include #include @@ -38,6 +39,7 @@ #include #include #include +#include =20 #include =20 --=20 2.39.1 From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3135EE49AB for ; Mon, 21 Aug 2023 07:21:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233680AbjHUHVZ (ORCPT ); Mon, 21 Aug 2023 03:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233671AbjHUHVW (ORCPT ); Mon, 21 Aug 2023 03:21:22 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB897128; Mon, 21 Aug 2023 00:20:54 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-31ae6bf91a9so2147342f8f.2; Mon, 21 Aug 2023 00:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602453; x=1693207253; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b5JCAEGGsGz8CsfvHPWWh5Q2sigmg/HJtWn0W/rRUfc=; b=pf6VhGV0058cUUDP9bEW9WsQrpQLSCMTLk6gDxK17DNlMhGgRgod6cTrguz8rQ3/9d /s+geTI/+b//YJ8lmpmguE2lERCeAySiqM3ogRLf0IPzOcm3SnKyX4y/IvEQ/KPahK0i KA8ASd8PGWbGeyhiTZGJfn2WZDGk4pAyFMrEobnDX2EWtV3dL4KlpUtqzRpew4skAhKV 2wf+wti4tqt/y4FkYihavmidOQqWvIJmBCwSjKlIJxVZWPgYnO8ZNhsoOzBdgAEXz9i7 xDBNUH9jNVOx7AxhTbVQVUWzweO+C2L77tOZbvD+ZkC7kdD2vXwrwdPcC8QxTUzjnFiP ZJ0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602453; x=1693207253; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b5JCAEGGsGz8CsfvHPWWh5Q2sigmg/HJtWn0W/rRUfc=; b=aTFqa9G3o8v4C+hXUIbaZtwWwZpJ8qTiuDcoGJopdA2XdBtvsAQsT3niiaHVuXx7dQ 7cn7wEd+XPshgKOomuYUW+wdBGwHDEGDoV7XEO3J2I6Fp1aQlzLI/kBHnlQx/wwcAqe2 zUm042iE26c+wBo3+9kuvzXS0UexqGaT5fLK/4j5iSfUjZRQV/3FH9v9UPt9Zwu3e0R9 GYxFkz5R+2U/Wlp2fifVwItsSCsCJnGDTthDwLX9/0szlxebIGxUzA9o5/BSOTxbUqiq B3wzrvtG+eYRFTQCgQudDN09d8ZHcaWo3jVhsdmrBLTQOQHYUgnsYyA88nMzwi9gmXrN z0hQ== X-Gm-Message-State: AOJu0YwOAVcva6r4CZ7g32S2Fh/4b/2BoAw2uWzClLF75aRbALZpc5dH 8YF3bLlkX2v3WBARtGMrlpdon4v6Wx0= X-Google-Smtp-Source: AGHT+IGk1vmeXmb2KC89lcy6G3MiMIBEat9EVg3lcTFYxsXeNVe/8TR8bZE0gFw8ROR1roI9IF5B7g== X-Received: by 2002:adf:e6c9:0:b0:313:dee2:e052 with SMTP id y9-20020adfe6c9000000b00313dee2e052mr4299183wrm.26.1692602452808; Mon, 21 Aug 2023 00:20:52 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id w14-20020adfec4e000000b003180822cf8fsm11591707wrn.1.2023.08.21.00.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:52 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Arnd Bergmann , Jonas Bonn , Stefan Kristiansson , linux-openrisc@vger.kernel.org Subject: [PATCH 6/8] openriac: Remove unused nommu_dump_state function Date: Mon, 21 Aug 2023 08:20:05 +0100 Message-Id: <20230821072007.2698186-7-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When compiling with W=3D1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/traps.c:146:6: error: no previous prototype for 'nom= mu_dump_state' [-Werror=3Dmissing-prototypes] This function is not used so remove it. Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd= @kernel.org/ Signed-off-by: Stafford Horne --- arch/openrisc/kernel/traps.c | 75 ------------------------------------ 1 file changed, 75 deletions(-) diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c index 879fbf57c04e..9370888c9a7e 100644 --- a/arch/openrisc/kernel/traps.c +++ b/arch/openrisc/kernel/traps.c @@ -36,7 +36,6 @@ #include #include =20 -static int kstack_depth_to_print =3D 0x180; int lwa_flag; static unsigned long __user *lwa_addr; =20 @@ -153,80 +152,6 @@ void show_registers(struct pt_regs *regs) printk("\n"); } =20 -void nommu_dump_state(struct pt_regs *regs, - unsigned long ea, unsigned long vector) -{ - int i; - unsigned long addr, stack =3D regs->sp; - - printk("\n\r[nommu_dump_state] :: ea %lx, vector %lx\n\r", ea, vector); - - printk("CPU #: %d\n" - " PC: %08lx SR: %08lx SP: %08lx\n", - 0, regs->pc, regs->sr, regs->sp); - printk("GPR00: %08lx GPR01: %08lx GPR02: %08lx GPR03: %08lx\n", - 0L, regs->gpr[1], regs->gpr[2], regs->gpr[3]); - printk("GPR04: %08lx GPR05: %08lx GPR06: %08lx GPR07: %08lx\n", - regs->gpr[4], regs->gpr[5], regs->gpr[6], regs->gpr[7]); - printk("GPR08: %08lx GPR09: %08lx GPR10: %08lx GPR11: %08lx\n", - regs->gpr[8], regs->gpr[9], regs->gpr[10], regs->gpr[11]); - printk("GPR12: %08lx GPR13: %08lx GPR14: %08lx GPR15: %08lx\n", - regs->gpr[12], regs->gpr[13], regs->gpr[14], regs->gpr[15]); - printk("GPR16: %08lx GPR17: %08lx GPR18: %08lx GPR19: %08lx\n", - regs->gpr[16], regs->gpr[17], regs->gpr[18], regs->gpr[19]); - printk("GPR20: %08lx GPR21: %08lx GPR22: %08lx GPR23: %08lx\n", - regs->gpr[20], regs->gpr[21], regs->gpr[22], regs->gpr[23]); - printk("GPR24: %08lx GPR25: %08lx GPR26: %08lx GPR27: %08lx\n", - regs->gpr[24], regs->gpr[25], regs->gpr[26], regs->gpr[27]); - printk("GPR28: %08lx GPR29: %08lx GPR30: %08lx GPR31: %08lx\n", - regs->gpr[28], regs->gpr[29], regs->gpr[30], regs->gpr[31]); - printk(" RES: %08lx oGPR11: %08lx\n", - regs->gpr[11], regs->orig_gpr11); - - printk("Process %s (pid: %d, stackpage=3D%08lx)\n", - ((struct task_struct *)(__pa(current)))->comm, - ((struct task_struct *)(__pa(current)))->pid, - (unsigned long)current); - - printk("\nStack: "); - printk("Stack dump [0x%08lx]:\n", (unsigned long)stack); - for (i =3D 0; i < kstack_depth_to_print; i++) { - if (((long)stack & (THREAD_SIZE - 1)) =3D=3D 0) - break; - stack++; - - printk("%lx :: sp + %02d: 0x%08lx\n", stack, i * 4, - *((unsigned long *)(__pa(stack)))); - } - printk("\n"); - - printk("Call Trace: "); - i =3D 1; - while (((long)stack & (THREAD_SIZE - 1)) !=3D 0) { - addr =3D *((unsigned long *)__pa(stack)); - stack++; - - if (kernel_text_address(addr)) { - if (i && ((i % 6) =3D=3D 0)) - printk("\n "); - printk(" [<%08lx>]", addr); - i++; - } - } - printk("\n"); - - printk("\nCode: "); - - for (i =3D -24; i < 24; i++) { - unsigned long word; - - word =3D ((unsigned long *)(__pa(regs->pc)))[i]; - - print_data(regs->pc, word, i); - } - printk("\n"); -} - /* This is normally the 'Oops' routine */ void __noreturn die(const char *str, struct pt_regs *regs, long err) { --=20 2.39.1 From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F265EE49AB for ; Mon, 21 Aug 2023 07:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233682AbjHUHVm (ORCPT ); Mon, 21 Aug 2023 03:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233671AbjHUHVi (ORCPT ); Mon, 21 Aug 2023 03:21:38 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8509101; Mon, 21 Aug 2023 00:21:10 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2bb9a063f26so48300931fa.2; Mon, 21 Aug 2023 00:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602456; x=1693207256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KV7YEkRDUOK8Ern69OCZnFizXDEAYTH04VxrFAd8qf4=; b=h4A5LLs6SBp6FX0vWD3VsGC6WMaQM891e+VCsIev4pKr1L3HGqxsaKUVJOvLjuKKF6 uLfBovHL9K22+6c8O8dIg28ER5fqLPMzaucyeSLbe5GyOLtrTJMJfbdpBS5N4if/vkar hNj9JPwZHIWt6SUUOl1njGT8PK8Zq3vPK4A2ez6W4lItdgcWQjcq0/2iQL2wqWcokG/2 CXrndLF8xqfzj7pV44sGtxzCAIDVZDb0wctq2J3unO4b8k33r7z5MPaatMEkXeNrReU9 sezIMdXTgtsX95EdAVqwnkiWxBmr1a96bMSlV1t6j9FyRZIn3Yps5k9OIcWX3Rln2JEh fNXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602456; x=1693207256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KV7YEkRDUOK8Ern69OCZnFizXDEAYTH04VxrFAd8qf4=; b=XuNbKXqi/o2Yew/PwV7jmY1U62suZW2DwmOg9bCJDGOzixiw/0BtKEsV0Fn/wKWoQh LQ3js7TuEDdJbMGubrZFOMhMG6wAKTAPoP8gUEDibhevpVdpOHi4z4AZy+CVHheuov54 3BuO1rWQidsP2EqcM19TEY8hh1jFagufbYW+cyk0Zc/5Mc+MhPfq3hNolUWXY8e1xEUK cltkPqoYgTwe79Ezm9gJQ7wEtTbD2mc+4rF/jY3m0KE45ezpPFuc6diOG4a5pvwkxjLe IqyAycIbtWasMnImp990h1otC5JIsfOzcs8AZAZB1JJuOPhLj8TcjOO24DA8HPqjGjep U/Wg== X-Gm-Message-State: AOJu0Yy7rF0OpAc9veAA+UJfUKZvscutUAKOdf5HvWmOR0SZVQjw1n4F bzqIWgqB+gp7FREW8uPx8aT3OmwLgG4= X-Google-Smtp-Source: AGHT+IHE1CPvk7EHV1kQMXa/BySO83GYBw15f51jehyRHUgSKAyR0HQ6Pv7hM5A/MpC7ZNXiVF/V2Q== X-Received: by 2002:a2e:720e:0:b0:2bb:b56b:f67e with SMTP id n14-20020a2e720e000000b002bbb56bf67emr3292569ljc.19.1692602455563; Mon, 21 Aug 2023 00:20:55 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id m25-20020a7bcb99000000b003fee7b67f67sm6474421wmi.31.2023.08.21.00.20.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:55 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Arnd Bergmann , Jonas Bonn , Stefan Kristiansson , linux-openrisc@vger.kernel.org Subject: [PATCH 7/8] openrisc: Remove unused tlb_init function Date: Mon, 21 Aug 2023 08:20:06 +0100 Message-Id: <20230821072007.2698186-8-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When compiling with W=3D1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/mm/tlb.c:188:13: error: no previous prototype for 'tlb_init= ' [-Werror=3Dmissing-prototypes] This function is not implemented or used so remove it. Reported-by: Arnd Bergmann Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd= @kernel.org/ Signed-off-by: Stafford Horne --- arch/openrisc/mm/init.c | 2 -- arch/openrisc/mm/tlb.c | 9 --------- 2 files changed, 11 deletions(-) diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c index d531ab82be12..1dcd78c8f0e9 100644 --- a/arch/openrisc/mm/init.c +++ b/arch/openrisc/mm/init.c @@ -123,8 +123,6 @@ static void __init map_ram(void) =20 void __init paging_init(void) { - extern void tlb_init(void); - int i; =20 printk(KERN_INFO "Setting up paging and PTEs.\n"); diff --git a/arch/openrisc/mm/tlb.c b/arch/openrisc/mm/tlb.c index e2f2a3c3bb22..3115f2e4f864 100644 --- a/arch/openrisc/mm/tlb.c +++ b/arch/openrisc/mm/tlb.c @@ -182,12 +182,3 @@ void destroy_context(struct mm_struct *mm) flush_tlb_mm(mm); =20 } - -/* called once during VM initialization, from init.c */ - -void __init tlb_init(void) -{ - /* Do nothing... */ - /* invalidate the entire TLB */ - /* flush_tlb_all(); */ -} --=20 2.39.1 From nobody Wed Dec 17 12:34:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35722EE4993 for ; Mon, 21 Aug 2023 07:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233695AbjHUHVo (ORCPT ); Mon, 21 Aug 2023 03:21:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232856AbjHUHVj (ORCPT ); Mon, 21 Aug 2023 03:21:39 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF360A9; Mon, 21 Aug 2023 00:21:13 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so28459195e9.2; Mon, 21 Aug 2023 00:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692602457; x=1693207257; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QC1pRvrNyLiVD1h/D+teZ8aHEzmdmZeRSHjacOPpsZw=; b=fmNwq+0FqFp0bR8U9XknpCheXzMgN8PgS44eXJJGvUyrfLMwFEJS8usQCoyfFtWlJs xutrUM+6oszrKdJmSXF9YxyKt3Yv83+NoQWIcZNsLA4Y2XePfQ6j+wS4occ+s2nRklZF uiwDxzIXbi4g+J7K8WKEdbrpfF/CYqHO3Kp3hK5IV38j/TlwWZqytsWCKjfD9+zUewUi RmluAP/m+8wHfjVfhR1hR3ns7NElB2FHK1/9lrMSppVZ6dbiFCJSf+0FD+1Yqx8fl/je 3c4tou46nfwjDMYNta87SZtPdZziq6zZ36D+BW/GcAFv+L+vfscidraZn40ylVItkguB ODsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692602457; x=1693207257; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QC1pRvrNyLiVD1h/D+teZ8aHEzmdmZeRSHjacOPpsZw=; b=SFGo4TIRuEIZUXtYrUPOFhHvjNZj+2Ix5K9SljBvlqQXyuyEKGMazh3Z4m+8CAc/B3 xvVOfCl4Y79pKKlQu0E7rtTbm/Dm2yT8fkJEURvnalpISrv5K5gpcMU4Ez8EmKHaBCbb LCftQldQJfkig7/8vnehJ2yBARbpXxuFZlNULSp7ybL65XKEUcexyTbUN2pnYcVjDCwu AfqPly6T17o/k/rt/JXbjE7fygNnSRplb8nKmJ1TZPFWjUtp8ycaaL3/BlbH9CKdt0Y0 jaf98oTW9HbgOha6Tb4V8DhENudmbTeY/nTPKdyBiE/WhOwskcHrEAh0CK/Gh+bTq5ZZ 1t6g== X-Gm-Message-State: AOJu0Yy49bxT81l7UGhbWyi+kreGJcOrcqedZm0le65xvPjYjD/3s8+k ZltiuzsqE1N+LlmkQcsKKQ/YnqYQwj0= X-Google-Smtp-Source: AGHT+IFW1+UpsEH8D3c6eUX7uDf76KpVXePxuZiPPzZaNyfB2F2z7xVYUzY3rsO7j0GfeFF1IDD7Ng== X-Received: by 2002:a05:600c:364a:b0:3fe:d70f:b0a2 with SMTP id y10-20020a05600c364a00b003fed70fb0a2mr4863614wmq.6.1692602457408; Mon, 21 Aug 2023 00:20:57 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id l3-20020a1ced03000000b003fe1a96845bsm15153571wmh.2.2023.08.21.00.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 00:20:57 -0700 (PDT) From: Stafford Horne To: LKML Cc: Stafford Horne , Jonas Bonn , Stefan Kristiansson , linux-openrisc@vger.kernel.org Subject: [PATCH 8/8] openrisc: Remove kernel-doc marker from ioremap comment Date: Mon, 21 Aug 2023 08:20:07 +0100 Message-Id: <20230821072007.2698186-9-shorne@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230821072007.2698186-1-shorne@gmail.com> References: <20230821072007.2698186-1-shorne@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Replace the kernel-doc marker (/**) with a regular comment to fix the warning: arch/openrisc/mm/ioremap.c:108: warning: This comment starts with '/**', = but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Stafford Horne --- arch/openrisc/mm/ioremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c index 8ec0dafecf25..c6717f876c1c 100644 --- a/arch/openrisc/mm/ioremap.c +++ b/arch/openrisc/mm/ioremap.c @@ -104,7 +104,7 @@ void iounmap(volatile void __iomem *addr) } EXPORT_SYMBOL(iounmap); =20 -/** +/* * OK, this one's a bit tricky... ioremap can get called before memory is * initialized (early serial console does this) and will want to alloc a p= age * for its mapping. No userspace pages will ever get allocated before mem= ory --=20 2.39.1