From: Michael Ellerman <mpe@ellerman.id.au>
To: Luming Yu <luming.yu@shingroup.cn>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
npiggin@gmail.com, christophe.leroy@csgroup.eu
Cc: shenghui.qu@shingroup.cn, Luming Yu <luming.yu@shingroup.cn>,
dawei.li@shingroup.cn, ke.zhao@shingroup.cn, luming.yu@gmail.com
Subject: Re: [PATCH 1/1] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER
Date: Mon, 11 Dec 2023 21:05:32 +1100 [thread overview]
Message-ID: <87plzddpg3.fsf@mail.lhotse> (raw)
In-Reply-To: <475A60AEEAA99F6C+20231211025054.885-1-luming.yu@shingroup.cn>
Luming Yu <luming.yu@shingroup.cn> writes:
> The support for user return notifier infrastructure
> is hooked into powerpc architecture.
> ---
> arch/powerpc/Kconfig | 1 +
> arch/powerpc/include/asm/entry-common.h | 16 ++++++++++++++++
> arch/powerpc/include/asm/thread_info.h | 2 ++
> arch/powerpc/kernel/process.c | 2 ++
> 4 files changed, 21 insertions(+)
> create mode 100644 arch/powerpc/include/asm/entry-common.h
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index c10229c0243c..b968068cc04a 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -277,6 +277,7 @@ config PPC
> select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
> select HAVE_STATIC_CALL if PPC32
> select HAVE_SYSCALL_TRACEPOINTS
> + select HAVE_USER_RETURN_NOTIFIER
> select HAVE_VIRT_CPU_ACCOUNTING
> select HAVE_VIRT_CPU_ACCOUNTING_GEN
> select HOTPLUG_SMT if HOTPLUG_CPU
> diff --git a/arch/powerpc/include/asm/entry-common.h b/arch/powerpc/include/asm/entry-common.h
> new file mode 100644
> index 000000000000..51f1eb767696
> --- /dev/null
> +++ b/arch/powerpc/include/asm/entry-common.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef ARCH_POWERPC_ENTRY_COMMON_H
> +#define ARCH_POWERPC_ENTRY_COMMON_H
> +
> +#include <linux/user-return-notifier.h>
> +
> +static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
> + unsigned long ti_work)
> +{
> + if (ti_work & _TIF_USER_RETURN_NOTIFY)
> + fire_user_return_notifiers();
> +}
> +
> +#define arch_exit_to_user_mode_prepare arch_exit_to_user_mode_prepare
AFAICS this is never called because we don't use CONFIG_GENERIC_ENTRY ?
cheers
prev parent reply other threads:[~2023-12-11 10:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 2:50 [PATCH 1/1] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER Luming Yu
2023-12-11 6:34 ` Christophe Leroy
2023-12-11 10:05 ` Michael Ellerman [this message]
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=87plzddpg3.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=christophe.leroy@csgroup.eu \
--cc=dawei.li@shingroup.cn \
--cc=ke.zhao@shingroup.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luming.yu@gmail.com \
--cc=luming.yu@shingroup.cn \
--cc=npiggin@gmail.com \
--cc=shenghui.qu@shingroup.cn \
/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;
as well as URLs for NNTP newsgroup(s).