From: Conor Dooley <conor.dooley@microchip.com>
To: Ben Dooks <ben.dooks@codethink.co.uk>
Cc: <linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<paul.walmsley@sifive.com>, <palmer@dabbelt.com>,
<aou@eecs.berkeley.edu>
Subject: Re: [PATCH] riscv: declare overflow_stack as exported from traps.c
Date: Thu, 23 Nov 2023 13:51:47 +0000 [thread overview]
Message-ID: <20231123-blooper-very-cefbf92c0f05@wendy> (raw)
In-Reply-To: <20231123134214.81481-1-ben.dooks@codethink.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]
On Thu, Nov 23, 2023 at 01:42:14PM +0000, Ben Dooks wrote:
> The percpu area overflow_stacks is exported from arch/riscv/kernel/traps.c
> for use in the entry code, but is not declared anywhere. Add the relevant
> declaration to arch/riscv/include/asm/stacktrace.h to silence the following
> sparse warning:
>
> arch/riscv/kernel/traps.c:395:1: warning: symbol '__pcpu_scope_overflow_stack' was not declared. Should it be static?
>
> We don't add the stackinfo_get_overflow() call as for some of the other
> architectures as this doesn't seem to be used yet, so just silence the
> warning.
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
I suppose this should also be
Fixes: be97d0db5f44 ("riscv: VMAP_STACK overflow detection thread-safe")
Cheers,
Conor.
> ---
> arch/riscv/include/asm/stacktrace.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/riscv/include/asm/stacktrace.h b/arch/riscv/include/asm/stacktrace.h
> index f7e8ef2418b9..b1495a7e06ce 100644
> --- a/arch/riscv/include/asm/stacktrace.h
> +++ b/arch/riscv/include/asm/stacktrace.h
> @@ -21,4 +21,9 @@ static inline bool on_thread_stack(void)
> return !(((unsigned long)(current->stack) ^ current_stack_pointer) & ~(THREAD_SIZE - 1));
> }
>
> +
> +#ifdef CONFIG_VMAP_STACK
> +DECLARE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack);
> +#endif /* CONFIG_VMAP_STACK */
> +
> #endif /* _ASM_RISCV_STACKTRACE_H */
> --
> 2.37.2.352.g3c44437643
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-11-23 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 13:42 Ben Dooks
2023-11-23 13:51 ` Conor Dooley [this message]
2023-11-23 13:54 ` Ben Dooks
2024-02-08 1:30 ` patchwork-bot+linux-riscv
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=20231123-blooper-very-cefbf92c0f05@wendy \
--to=conor.dooley@microchip.com \
--cc=aou@eecs.berkeley.edu \
--cc=ben.dooks@codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®