From: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
To: Luming Yu <luming.yu@shingroup.cn>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
mpe@ellerman.id.au, 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 v1 2/2] powerpc/debug: hook to user return notifier infrastructure
Date: Mon, 18 Dec 2023 14:54:53 +0530 [thread overview]
Message-ID: <8734vzsw0q.fsf@kernel.org> (raw)
In-Reply-To: <B375A36C9C4D73FF+20231218031338.2084-1-luming.yu@shingroup.cn>
Luming Yu <luming.yu@shingroup.cn> writes:
> Before we have powerpc to use the generic entry infrastructure,
> the call to fire user return notifier is made temporarily in powerpc
> entry code.
>
It is still not clear what will be registered as user return notifier.
Can you summarize that here?
>
> Signed-off-by: Luming Yu <luming.yu@shingroup.cn>
> ---
> arch/powerpc/kernel/interrupt.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
> index c4f6d3c69ba9..7fe704946e96 100644
> --- a/arch/powerpc/kernel/interrupt.c
> +++ b/arch/powerpc/kernel/interrupt.c
> @@ -19,6 +19,7 @@
> #include <asm/time.h>
> #include <asm/tm.h>
> #include <asm/unistd.h>
> +#include <asm/entry-common.h>
>
> #if defined(CONFIG_PPC_ADV_DEBUG_REGS) && defined(CONFIG_PPC32)
> unsigned long global_dbcr0[NR_CPUS];
> @@ -245,6 +246,8 @@ interrupt_exit_user_prepare_main(unsigned long ret, struct pt_regs *regs)
> /* Restore user access locks last */
> kuap_user_restore(regs);
>
> + arch_exit_to_user_mode_prepare(regs, ti_flags);
> +
>
That will run the notifier with user AMR/IAMR values.
> return ret;
> }
>
> --
> 2.42.0.windows.2
next prev parent reply other threads:[~2023-12-18 9:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 3:13 [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure Luming Yu
2023-12-18 9:24 ` Aneesh Kumar K.V [this message]
2023-12-19 6:33 ` Michael Ellerman
2024-02-20 8:51 ` Christophe Leroy
2024-02-20 9:02 ` Christophe Leroy
2024-08-28 3:17 ` 虞陆铭
2024-08-28 5:46 ` Christophe Leroy
2024-08-28 6:50 ` Luming Yu
2024-08-28 7:27 ` Christophe Leroy
2024-08-29 9:58 ` Luming Yu
2024-09-02 8:34 ` Luming Yu
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=8734vzsw0q.fsf@kernel.org \
--to=aneesh.kumar@kernel.org \
--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=mpe@ellerman.id.au \
--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).