From: Conor Dooley <mail@conchuod.ie> To: Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu> Cc: Conor Dooley <conor.dooley@microchip.com>, Guo Ren <guoren@kernel.org>, Vincent Chen <vincent.chen@sifive.com>, Xianting Tian <xianting.tian@linux.alibaba.com>, Heiko Stuebner <heiko@sntech.de>, Kefeng Wang <wangkefeng.wang@huawei.com>, Tong Tiangen <tongtiangen@huawei.com>, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] riscv: traps: add missing prototype Date: Sun, 14 Aug 2022 15:12:38 +0100 [thread overview] Message-ID: <20220814141237.493457-5-mail@conchuod.ie> (raw) In-Reply-To: <20220814141237.493457-1-mail@conchuod.ie> From: Conor Dooley <conor.dooley@microchip.com> Sparse complains: arch/riscv/kernel/traps.c:213:6: warning: symbol 'shadow_stack' was not declared. Should it be static? The variable is used in entry.S, so declare shadow_stack there alongside SHADOW_OVERFLOW_STACK_SIZE. Fixes: 31da94c25aea ("riscv: add VMAP_STACK overflow detection") Signed-off-by: Conor Dooley <conor.dooley@microchip.com> --- arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/traps.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 78933ac04995..67322f878e0d 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -42,6 +42,8 @@ #ifndef __ASSEMBLY__ +extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)]; + #include <asm/processor.h> #include <asm/csr.h> diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 39d0f8bba4b4..635e6ec26938 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -20,9 +20,10 @@ #include <asm/asm-prototypes.h> #include <asm/bug.h> +#include <asm/csr.h> #include <asm/processor.h> #include <asm/ptrace.h> -#include <asm/csr.h> +#include <asm/thread_info.h> int show_unhandled_signals = 1; -- 2.37.1
WARNING: multiple messages have this Message-ID (diff)
From: Conor Dooley <mail@conchuod.ie> To: Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu> Cc: Conor Dooley <conor.dooley@microchip.com>, Guo Ren <guoren@kernel.org>, Vincent Chen <vincent.chen@sifive.com>, Xianting Tian <xianting.tian@linux.alibaba.com>, Heiko Stuebner <heiko@sntech.de>, Kefeng Wang <wangkefeng.wang@huawei.com>, Tong Tiangen <tongtiangen@huawei.com>, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] riscv: traps: add missing prototype Date: Sun, 14 Aug 2022 15:12:38 +0100 [thread overview] Message-ID: <20220814141237.493457-5-mail@conchuod.ie> (raw) In-Reply-To: <20220814141237.493457-1-mail@conchuod.ie> From: Conor Dooley <conor.dooley@microchip.com> Sparse complains: arch/riscv/kernel/traps.c:213:6: warning: symbol 'shadow_stack' was not declared. Should it be static? The variable is used in entry.S, so declare shadow_stack there alongside SHADOW_OVERFLOW_STACK_SIZE. Fixes: 31da94c25aea ("riscv: add VMAP_STACK overflow detection") Signed-off-by: Conor Dooley <conor.dooley@microchip.com> --- arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/traps.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 78933ac04995..67322f878e0d 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -42,6 +42,8 @@ #ifndef __ASSEMBLY__ +extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)]; + #include <asm/processor.h> #include <asm/csr.h> diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 39d0f8bba4b4..635e6ec26938 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -20,9 +20,10 @@ #include <asm/asm-prototypes.h> #include <asm/bug.h> +#include <asm/csr.h> #include <asm/processor.h> #include <asm/ptrace.h> -#include <asm/csr.h> +#include <asm/thread_info.h> int show_unhandled_signals = 1; -- 2.37.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-08-14 14:13 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-14 14:12 [PATCH 0/4] misc warning cleanup in arch/risc-v Conor Dooley 2022-08-14 14:12 ` Conor Dooley 2022-08-14 14:12 ` [PATCH 1/4] riscv: kvm: vcpu_timer: fix unused variable warnings Conor Dooley 2022-08-14 14:12 ` Conor Dooley 2022-08-19 16:11 ` Anup Patel 2022-08-19 16:11 ` Anup Patel 2022-08-19 20:09 ` Atish Patra 2022-08-19 20:09 ` Atish Patra 2022-08-14 14:12 ` [PATCH 2/4] riscv: kvm: move extern sbi_ext declarations to a header Conor Dooley 2022-08-14 14:12 ` Conor Dooley 2022-08-19 16:12 ` Anup Patel 2022-08-19 16:12 ` Anup Patel 2022-08-14 14:12 ` [PATCH 3/4] riscv: signal: fix missing prototype warning Conor Dooley 2022-08-14 14:12 ` Conor Dooley 2022-08-14 14:12 ` Conor Dooley [this message] 2022-08-14 14:12 ` [PATCH 4/4] riscv: traps: add missing prototype Conor Dooley 2022-08-18 23:01 ` [PATCH 0/4] misc warning cleanup in arch/risc-v Palmer Dabbelt 2022-08-18 23:01 ` Palmer Dabbelt 2022-08-19 11:34 ` Conor.Dooley 2022-08-19 11:34 ` Conor.Dooley 2022-08-19 16:14 ` Anup Patel 2022-08-19 16:14 ` Anup Patel 2022-08-25 23:42 ` Palmer Dabbelt 2022-08-25 23:42 ` Palmer Dabbelt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220814141237.493457-5-mail@conchuod.ie \ --to=mail@conchuod.ie \ --cc=anup@brainfault.org \ --cc=aou@eecs.berkeley.edu \ --cc=atishp@atishpatra.org \ --cc=conor.dooley@microchip.com \ --cc=guoren@kernel.org \ --cc=heiko@sntech.de \ --cc=kvm-riscv@lists.infradead.org \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ --cc=tongtiangen@huawei.com \ --cc=vincent.chen@sifive.com \ --cc=wangkefeng.wang@huawei.com \ --cc=xianting.tian@linux.alibaba.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.