* Re: [PATCH] alpha: add support for TIF_NOTIFY_SIGNAL
@ 2020-12-12 15:35 Guenter Roeck
2020-12-12 16:16 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2020-12-12 15:35 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-alpha, Richard Henderson, Matt Turner, Ivan Kokshaysky
On Thu, Oct 08, 2020 at 09:11:42AM -0600, Jens Axboe wrote:
> Wire up TIF_NOTIFY_SIGNAL handling for alpha.
>
> Cc: linux-alpha@vger.kernel.org
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> ---
...
> work_pending:
> - and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
> + and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, | _TIF_NOTIFY_SIGNAL, $2
^^^^^
Does this compile anywhere ?
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] alpha: add support for TIF_NOTIFY_SIGNAL
2020-12-12 15:35 [PATCH] alpha: add support for TIF_NOTIFY_SIGNAL Guenter Roeck
@ 2020-12-12 16:16 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2020-12-12 16:16 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-alpha, Richard Henderson, Matt Turner, Ivan Kokshaysky
On 12/12/20 8:35 AM, Guenter Roeck wrote:
> On Thu, Oct 08, 2020 at 09:11:42AM -0600, Jens Axboe wrote:
>> Wire up TIF_NOTIFY_SIGNAL handling for alpha.
>>
>> Cc: linux-alpha@vger.kernel.org
>> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>> ---
> ...
>> work_pending:
>> - and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
>> + and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, | _TIF_NOTIFY_SIGNAL, $2
> ^^^^^
>
> Does this compile anywhere ?
Fixed up, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] alpha: add support for TIF_NOTIFY_SIGNAL
2020-10-29 16:00 Jens Axboe
@ 2020-11-05 16:19 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2020-11-05 16:19 UTC (permalink / raw)
To: linux-alpha
Gentle nudge on this one.
On 10/29/20 10:00 AM, Jens Axboe wrote:
> Wire up TIF_NOTIFY_SIGNAL handling for alpha.
>
> Cc: linux-alpha@vger.kernel.org
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> ---
>
> 5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting
> for details:
>
> https://lore.kernel.org/io-uring/20201026203230.386348-1-axboe@kernel.dk/
>
> As part of that work, I'm adding TIF_NOTIFY_SIGNAL support to all archs,
> as that will enable a set of cleanups once all of them support it. I'm
> happy carrying this patch if need be, or it can be funelled through the
> arch tree. Let me know.
>
> arch/alpha/include/asm/thread_info.h | 2 ++
> arch/alpha/kernel/entry.S | 2 +-
> arch/alpha/kernel/signal.c | 2 +-
> 3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
> index 807d7b9a1860..2592356e3215 100644
> --- a/arch/alpha/include/asm/thread_info.h
> +++ b/arch/alpha/include/asm/thread_info.h
> @@ -62,6 +62,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
> #define TIF_SIGPENDING 2 /* signal pending */
> #define TIF_NEED_RESCHED 3 /* rescheduling necessary */
> #define TIF_SYSCALL_AUDIT 4 /* syscall audit active */
> +#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */
> #define TIF_DIE_IF_KERNEL 9 /* dik recursion lock */
> #define TIF_MEMDIE 13 /* is terminating due to OOM killer */
> #define TIF_POLLING_NRFLAG 14 /* idle is polling for TIF_NEED_RESCHED */
> @@ -71,6 +72,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
> #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
> #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
> #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
> +#define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)
> #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
>
> /* Work to do on interrupt/exception return. */
> diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
> index 2e09248f8324..6a90d05cae1f 100644
> --- a/arch/alpha/kernel/entry.S
> +++ b/arch/alpha/kernel/entry.S
> @@ -544,7 +544,7 @@ $ret_success:
> .align 4
> .type work_pending, @function
> work_pending:
> - and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
> + and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, | _TIF_NOTIFY_SIGNAL, $2
> bne $2, $work_notifysig
>
> $work_resched:
> diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
> index 3739efce1ec0..948b89789da8 100644
> --- a/arch/alpha/kernel/signal.c
> +++ b/arch/alpha/kernel/signal.c
> @@ -527,7 +527,7 @@ do_work_pending(struct pt_regs *regs, unsigned long thread_flags,
> schedule();
> } else {
> local_irq_enable();
> - if (thread_flags & _TIF_SIGPENDING) {
> + if (thread_flags & (_TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL)) {
> do_signal(regs, r0, r19);
> r0 = 0;
> } else {
>
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] alpha: add support for TIF_NOTIFY_SIGNAL
@ 2020-10-29 16:00 Jens Axboe
2020-11-05 16:19 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2020-10-29 16:00 UTC (permalink / raw)
To: linux-alpha
Wire up TIF_NOTIFY_SIGNAL handling for alpha.
Cc: linux-alpha@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting
for details:
https://lore.kernel.org/io-uring/20201026203230.386348-1-axboe@kernel.dk/
As part of that work, I'm adding TIF_NOTIFY_SIGNAL support to all archs,
as that will enable a set of cleanups once all of them support it. I'm
happy carrying this patch if need be, or it can be funelled through the
arch tree. Let me know.
arch/alpha/include/asm/thread_info.h | 2 ++
arch/alpha/kernel/entry.S | 2 +-
arch/alpha/kernel/signal.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
index 807d7b9a1860..2592356e3215 100644
--- a/arch/alpha/include/asm/thread_info.h
+++ b/arch/alpha/include/asm/thread_info.h
@@ -62,6 +62,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_SYSCALL_AUDIT 4 /* syscall audit active */
+#define TIF_NOTIFY_SIGNAL 5 /* signal notifications exist */
#define TIF_DIE_IF_KERNEL 9 /* dik recursion lock */
#define TIF_MEMDIE 13 /* is terminating due to OOM killer */
#define TIF_POLLING_NRFLAG 14 /* idle is polling for TIF_NEED_RESCHED */
@@ -71,6 +72,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
+#define _TIF_NOTIFY_SIGNAL (1<<TIF_NOTIFY_SIGNAL)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
/* Work to do on interrupt/exception return. */
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index 2e09248f8324..6a90d05cae1f 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -544,7 +544,7 @@ $ret_success:
.align 4
.type work_pending, @function
work_pending:
- and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
+ and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, | _TIF_NOTIFY_SIGNAL, $2
bne $2, $work_notifysig
$work_resched:
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
index 3739efce1ec0..948b89789da8 100644
--- a/arch/alpha/kernel/signal.c
+++ b/arch/alpha/kernel/signal.c
@@ -527,7 +527,7 @@ do_work_pending(struct pt_regs *regs, unsigned long thread_flags,
schedule();
} else {
local_irq_enable();
- if (thread_flags & _TIF_SIGPENDING) {
+ if (thread_flags & (_TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL)) {
do_signal(regs, r0, r19);
r0 = 0;
} else {
--
2.29.0
--
Jens Axboe
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-12 16:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12 15:35 [PATCH] alpha: add support for TIF_NOTIFY_SIGNAL Guenter Roeck
2020-12-12 16:16 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2020-10-29 16:00 Jens Axboe
2020-11-05 16:19 ` Jens Axboe
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.