All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
@ 2020-10-29 16:14 Jens Axboe
  2020-11-05 16:19 ` Jens Axboe
  2020-11-06  5:42 ` Brian Cain
  0 siblings, 2 replies; 5+ messages in thread
From: Jens Axboe @ 2020-10-29 16:14 UTC (permalink / raw)
  To: linux-hexagon

Wire up TIF_NOTIFY_SIGNAL handling for hexagon.

Cc: linux-hexagon@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/hexagon/include/asm/thread_info.h | 2 ++
 arch/hexagon/kernel/process.c          | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h
index 563da1986464..535976665bf0 100644
--- a/arch/hexagon/include/asm/thread_info.h
+++ b/arch/hexagon/include/asm/thread_info.h
@@ -95,6 +95,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
 #define TIF_NEED_RESCHED        3       /* rescheduling necessary */
 #define TIF_SINGLESTEP          4       /* restore ss @ return to usr mode */
 #define TIF_RESTORE_SIGMASK     6       /* restore sig mask in do_signal() */
+#define TIF_NOTIFY_SIGNAL	7       /* signal notifications exist */
 /* true if poll_idle() is polling TIF_NEED_RESCHED */
 #define TIF_MEMDIE              17      /* OOM killer killed process */
 
@@ -103,6 +104,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
 #define _TIF_SIGPENDING         (1 << TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED       (1 << TIF_NEED_RESCHED)
 #define _TIF_SINGLESTEP         (1 << TIF_SINGLESTEP)
+#define _TIF_NOTIFY_SIGNAL	(1 << TIF_NOTIFY_SIGNAL)
 
 /* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */
 #define _TIF_WORK_MASK          (0x0000FFFF & ~_TIF_SYSCALL_TRACE)
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c
index 5a0a95d93ddb..82cd7a026eb3 100644
--- a/arch/hexagon/kernel/process.c
+++ b/arch/hexagon/kernel/process.c
@@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
 		return 1;
 	}
 
-	if (thread_info_flags & _TIF_SIGPENDING) {
+	if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
 		do_signal(regs);
 		return 1;
 	}
-- 
2.29.0

-- 
Jens Axboe


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
  2020-10-29 16:14 [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL Jens Axboe
@ 2020-11-05 16:19 ` Jens Axboe
  2020-11-05 17:38   ` Brian Cain
  2020-11-06  5:42 ` Brian Cain
  1 sibling, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2020-11-05 16:19 UTC (permalink / raw)
  To: linux-hexagon

Gentle nudge on this one.

On 10/29/20 10:14 AM, Jens Axboe wrote:
> Wire up TIF_NOTIFY_SIGNAL handling for hexagon.
> 
> Cc: linux-hexagon@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/hexagon/include/asm/thread_info.h | 2 ++
>  arch/hexagon/kernel/process.c          | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h
> index 563da1986464..535976665bf0 100644
> --- a/arch/hexagon/include/asm/thread_info.h
> +++ b/arch/hexagon/include/asm/thread_info.h
> @@ -95,6 +95,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
>  #define TIF_NEED_RESCHED        3       /* rescheduling necessary */
>  #define TIF_SINGLESTEP          4       /* restore ss @ return to usr mode */
>  #define TIF_RESTORE_SIGMASK     6       /* restore sig mask in do_signal() */
> +#define TIF_NOTIFY_SIGNAL	7       /* signal notifications exist */
>  /* true if poll_idle() is polling TIF_NEED_RESCHED */
>  #define TIF_MEMDIE              17      /* OOM killer killed process */
>  
> @@ -103,6 +104,7 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG);
>  #define _TIF_SIGPENDING         (1 << TIF_SIGPENDING)
>  #define _TIF_NEED_RESCHED       (1 << TIF_NEED_RESCHED)
>  #define _TIF_SINGLESTEP         (1 << TIF_SINGLESTEP)
> +#define _TIF_NOTIFY_SIGNAL	(1 << TIF_NOTIFY_SIGNAL)
>  
>  /* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */
>  #define _TIF_WORK_MASK          (0x0000FFFF & ~_TIF_SYSCALL_TRACE)
> diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c
> index 5a0a95d93ddb..82cd7a026eb3 100644
> --- a/arch/hexagon/kernel/process.c
> +++ b/arch/hexagon/kernel/process.c
> @@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
>  		return 1;
>  	}
>  
> -	if (thread_info_flags & _TIF_SIGPENDING) {
> +	if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
>  		do_signal(regs);
>  		return 1;
>  	}
> 


-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
  2020-11-05 16:19 ` Jens Axboe
@ 2020-11-05 17:38   ` Brian Cain
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Cain @ 2020-11-05 17:38 UTC (permalink / raw)
  To: 'Jens Axboe', linux-hexagon

> -----Original Message-----
> From: Jens Axboe <axboe@kernel.dk>
> Sent: Thursday, November 5, 2020 10:19 AM
> To: linux-hexagon@vger.kernel.org
> Subject: Re: [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
> 
> Gentle nudge on this one.

Sorry it slipped off my radar, I'll review it today.

-Brian


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
  2020-10-29 16:14 [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL Jens Axboe
  2020-11-05 16:19 ` Jens Axboe
@ 2020-11-06  5:42 ` Brian Cain
  2020-11-06 14:38   ` Jens Axboe
  1 sibling, 1 reply; 5+ messages in thread
From: Brian Cain @ 2020-11-06  5:42 UTC (permalink / raw)
  To: 'Jens Axboe', linux-hexagon

> -----Original Message-----
> From: Jens Axboe <axboe@kernel.dk>
> Sent: Thursday, October 29, 2020 11:14 AM
> To: linux-hexagon@vger.kernel.org
> Subject: [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
...
> --- a/arch/hexagon/kernel/process.c
> +++ b/arch/hexagon/kernel/process.c
> @@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32
> thread_info_flags)
>  		return 1;
>  	}
> 
> -	if (thread_info_flags & _TIF_SIGPENDING) {
> +	if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
> {
>  		do_signal(regs);
>  		return 1;
>  	}
> --
> 2.29.0
> 

Acked-by: Brian Cain <bcain@codeaurora.org>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
  2020-11-06  5:42 ` Brian Cain
@ 2020-11-06 14:38   ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2020-11-06 14:38 UTC (permalink / raw)
  To: bcain, linux-hexagon

On 11/5/20 10:42 PM, Brian Cain wrote:
>> -----Original Message-----
>> From: Jens Axboe <axboe@kernel.dk>
>> Sent: Thursday, October 29, 2020 11:14 AM
>> To: linux-hexagon@vger.kernel.org
>> Subject: [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL
> ...
>> --- a/arch/hexagon/kernel/process.c
>> +++ b/arch/hexagon/kernel/process.c
>> @@ -174,7 +174,7 @@ int do_work_pending(struct pt_regs *regs, u32
>> thread_info_flags)
>>  		return 1;
>>  	}
>>
>> -	if (thread_info_flags & _TIF_SIGPENDING) {
>> +	if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
>> {
>>  		do_signal(regs);
>>  		return 1;
>>  	}
>> --
>> 2.29.0
>>
> 
> Acked-by: Brian Cain <bcain@codeaurora.org>

Thanks Brian!

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-06 14:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-29 16:14 [PATCH] hexagon: add support for TIF_NOTIFY_SIGNAL Jens Axboe
2020-11-05 16:19 ` Jens Axboe
2020-11-05 17:38   ` Brian Cain
2020-11-06  5:42 ` Brian Cain
2020-11-06 14:38   ` 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.