linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
@ 2020-10-29 16:16 Jens Axboe
  2020-11-05 16:18 ` Jens Axboe
  2020-11-09 11:19 ` Michal Simek
  0 siblings, 2 replies; 8+ messages in thread
From: Jens Axboe @ 2020-10-29 16:16 UTC (permalink / raw)
  To: Michal Simek, linux-kernel

Wire up TIF_NOTIFY_SIGNAL handling for microblaze.

Cc: Michal Simek <monstr@monstr.eu>
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/microblaze/include/asm/thread_info.h | 2 ++
 arch/microblaze/kernel/signal.c           | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
index ad8e8fcb90d3..44f5ca331862 100644
--- a/arch/microblaze/include/asm/thread_info.h
+++ b/arch/microblaze/include/asm/thread_info.h
@@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_NEED_RESCHED	3 /* rescheduling necessary */
 /* restore singlestep on return to user mode */
 #define TIF_SINGLESTEP		4
+#define TIF_NOTIFY_SIGNAL	5	/* signal notifications exist */
 #define TIF_MEMDIE		6	/* is terminating due to OOM killer */
 #define TIF_SYSCALL_AUDIT	9       /* syscall auditing active */
 #define TIF_SECCOMP		10      /* secure computing */
@@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
 #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)
 #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
 #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
 #define _TIF_SECCOMP		(1 << TIF_SECCOMP)
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index f11a0ccccabc..5a8d173d7b75 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
 
 asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
 {
-	if (test_thread_flag(TIF_SIGPENDING))
+	if (test_thread_flag(TIF_SIGPENDING) ||
+	    test_thread_flag(TIF_NOTIFY_SIGNAL))
 		do_signal(regs, in_syscall);
 
 	if (test_thread_flag(TIF_NOTIFY_RESUME))
-- 
2.29.0

-- 
Jens Axboe


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

* Re: [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
  2020-10-29 16:16 [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL Jens Axboe
@ 2020-11-05 16:18 ` Jens Axboe
  2020-11-05 16:42   ` Michal Simek
  2020-11-09 11:19 ` Michal Simek
  1 sibling, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2020-11-05 16:18 UTC (permalink / raw)
  To: Michal Simek, linux-kernel

Gentle nudge on this one.

On 10/29/20 10:16 AM, Jens Axboe wrote:
> Wire up TIF_NOTIFY_SIGNAL handling for microblaze.
> 
> Cc: Michal Simek <monstr@monstr.eu>
> 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/microblaze/include/asm/thread_info.h | 2 ++
>  arch/microblaze/kernel/signal.c           | 3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
> index ad8e8fcb90d3..44f5ca331862 100644
> --- a/arch/microblaze/include/asm/thread_info.h
> +++ b/arch/microblaze/include/asm/thread_info.h
> @@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
>  #define TIF_NEED_RESCHED	3 /* rescheduling necessary */
>  /* restore singlestep on return to user mode */
>  #define TIF_SINGLESTEP		4
> +#define TIF_NOTIFY_SIGNAL	5	/* signal notifications exist */
>  #define TIF_MEMDIE		6	/* is terminating due to OOM killer */
>  #define TIF_SYSCALL_AUDIT	9       /* syscall auditing active */
>  #define TIF_SECCOMP		10      /* secure computing */
> @@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
>  #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)
>  #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
>  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
>  #define _TIF_SECCOMP		(1 << TIF_SECCOMP)
> diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
> index f11a0ccccabc..5a8d173d7b75 100644
> --- a/arch/microblaze/kernel/signal.c
> +++ b/arch/microblaze/kernel/signal.c
> @@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
>  
>  asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
>  {
> -	if (test_thread_flag(TIF_SIGPENDING))
> +	if (test_thread_flag(TIF_SIGPENDING) ||
> +	    test_thread_flag(TIF_NOTIFY_SIGNAL))
>  		do_signal(regs, in_syscall);
>  
>  	if (test_thread_flag(TIF_NOTIFY_RESUME))
> 


-- 
Jens Axboe


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

* Re: [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
  2020-11-05 16:18 ` Jens Axboe
@ 2020-11-05 16:42   ` Michal Simek
  2020-11-05 17:15     ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Simek @ 2020-11-05 16:42 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Hi,

čt 5. 11. 2020 v 17:18 odesílatel Jens Axboe <axboe@kernel.dk> napsal:
>
> Gentle nudge on this one.
>
> On 10/29/20 10:16 AM, Jens Axboe wrote:
> > Wire up TIF_NOTIFY_SIGNAL handling for microblaze.
> >
> > Cc: Michal Simek <monstr@monstr.eu>
> > 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/microblaze/include/asm/thread_info.h | 2 ++
> >  arch/microblaze/kernel/signal.c           | 3 ++-
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
> > index ad8e8fcb90d3..44f5ca331862 100644
> > --- a/arch/microblaze/include/asm/thread_info.h
> > +++ b/arch/microblaze/include/asm/thread_info.h
> > @@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
> >  #define TIF_NEED_RESCHED     3 /* rescheduling necessary */
> >  /* restore singlestep on return to user mode */
> >  #define TIF_SINGLESTEP               4
> > +#define TIF_NOTIFY_SIGNAL    5       /* signal notifications exist */
> >  #define TIF_MEMDIE           6       /* is terminating due to OOM killer */
> >  #define TIF_SYSCALL_AUDIT    9       /* syscall auditing active */
> >  #define TIF_SECCOMP          10      /* secure computing */
> > @@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
> >  #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)
> >  #define _TIF_POLLING_NRFLAG  (1 << TIF_POLLING_NRFLAG)
> >  #define _TIF_SYSCALL_AUDIT   (1 << TIF_SYSCALL_AUDIT)
> >  #define _TIF_SECCOMP         (1 << TIF_SECCOMP)
> > diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
> > index f11a0ccccabc..5a8d173d7b75 100644
> > --- a/arch/microblaze/kernel/signal.c
> > +++ b/arch/microblaze/kernel/signal.c
> > @@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
> >
> >  asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
> >  {
> > -     if (test_thread_flag(TIF_SIGPENDING))
> > +     if (test_thread_flag(TIF_SIGPENDING) ||
> > +         test_thread_flag(TIF_NOTIFY_SIGNAL))
> >               do_signal(regs, in_syscall);
> >
> >       if (test_thread_flag(TIF_NOTIFY_RESUME))
> >
>
>
> --
> Jens Axboe
>

Give me some time. I have it on my todo list.

M


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

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

* Re: [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
  2020-11-05 16:42   ` Michal Simek
@ 2020-11-05 17:15     ` Jens Axboe
  0 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2020-11-05 17:15 UTC (permalink / raw)
  To: Michal Simek; +Cc: linux-kernel

On 11/5/20 9:42 AM, Michal Simek wrote:
> Hi,
> 
> čt 5. 11. 2020 v 17:18 odesílatel Jens Axboe <axboe@kernel.dk> napsal:
>>
>> Gentle nudge on this one.
>>
>> On 10/29/20 10:16 AM, Jens Axboe wrote:
>>> Wire up TIF_NOTIFY_SIGNAL handling for microblaze.
>>>
>>> Cc: Michal Simek <monstr@monstr.eu>
>>> 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/microblaze/include/asm/thread_info.h | 2 ++
>>>  arch/microblaze/kernel/signal.c           | 3 ++-
>>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
>>> index ad8e8fcb90d3..44f5ca331862 100644
>>> --- a/arch/microblaze/include/asm/thread_info.h
>>> +++ b/arch/microblaze/include/asm/thread_info.h
>>> @@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
>>>  #define TIF_NEED_RESCHED     3 /* rescheduling necessary */
>>>  /* restore singlestep on return to user mode */
>>>  #define TIF_SINGLESTEP               4
>>> +#define TIF_NOTIFY_SIGNAL    5       /* signal notifications exist */
>>>  #define TIF_MEMDIE           6       /* is terminating due to OOM killer */
>>>  #define TIF_SYSCALL_AUDIT    9       /* syscall auditing active */
>>>  #define TIF_SECCOMP          10      /* secure computing */
>>> @@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
>>>  #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)
>>>  #define _TIF_POLLING_NRFLAG  (1 << TIF_POLLING_NRFLAG)
>>>  #define _TIF_SYSCALL_AUDIT   (1 << TIF_SYSCALL_AUDIT)
>>>  #define _TIF_SECCOMP         (1 << TIF_SECCOMP)
>>> diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
>>> index f11a0ccccabc..5a8d173d7b75 100644
>>> --- a/arch/microblaze/kernel/signal.c
>>> +++ b/arch/microblaze/kernel/signal.c
>>> @@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
>>>
>>>  asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
>>>  {
>>> -     if (test_thread_flag(TIF_SIGPENDING))
>>> +     if (test_thread_flag(TIF_SIGPENDING) ||
>>> +         test_thread_flag(TIF_NOTIFY_SIGNAL))
>>>               do_signal(regs, in_syscall);
>>>
>>>       if (test_thread_flag(TIF_NOTIFY_RESUME))
>>>
>>
>>
>> --
>> Jens Axboe
>>
> 
> Give me some time. I have it on my todo list.

Great, thanks!

-- 
Jens Axboe


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

* Re: [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
  2020-10-29 16:16 [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL Jens Axboe
  2020-11-05 16:18 ` Jens Axboe
@ 2020-11-09 11:19 ` Michal Simek
  2020-11-09 14:17   ` Jens Axboe
  1 sibling, 1 reply; 8+ messages in thread
From: Michal Simek @ 2020-11-09 11:19 UTC (permalink / raw)
  To: Jens Axboe, linux-kernel



On 29. 10. 20 17:16, Jens Axboe wrote:
> Wire up TIF_NOTIFY_SIGNAL handling for microblaze.
> 
> Cc: Michal Simek <monstr@monstr.eu>
> 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/microblaze/include/asm/thread_info.h | 2 ++
>  arch/microblaze/kernel/signal.c           | 3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
> index ad8e8fcb90d3..44f5ca331862 100644
> --- a/arch/microblaze/include/asm/thread_info.h
> +++ b/arch/microblaze/include/asm/thread_info.h
> @@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
>  #define TIF_NEED_RESCHED	3 /* rescheduling necessary */
>  /* restore singlestep on return to user mode */
>  #define TIF_SINGLESTEP		4
> +#define TIF_NOTIFY_SIGNAL	5	/* signal notifications exist */
>  #define TIF_MEMDIE		6	/* is terminating due to OOM killer */
>  #define TIF_SYSCALL_AUDIT	9       /* syscall auditing active */
>  #define TIF_SECCOMP		10      /* secure computing */
> @@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
>  #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)
>  #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
>  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
>  #define _TIF_SECCOMP		(1 << TIF_SECCOMP)
> diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
> index f11a0ccccabc..5a8d173d7b75 100644
> --- a/arch/microblaze/kernel/signal.c
> +++ b/arch/microblaze/kernel/signal.c
> @@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
>  
>  asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
>  {
> -	if (test_thread_flag(TIF_SIGPENDING))
> +	if (test_thread_flag(TIF_SIGPENDING) ||
> +	    test_thread_flag(TIF_NOTIFY_SIGNAL))
>  		do_signal(regs, in_syscall);
>  
>  	if (test_thread_flag(TIF_NOTIFY_RESUME))
> 

Applied for 5.11.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


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

* Re: [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
  2020-11-09 11:19 ` Michal Simek
@ 2020-11-09 14:17   ` Jens Axboe
  2020-11-09 14:18     ` Michal Simek
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2020-11-09 14:17 UTC (permalink / raw)
  To: Michal Simek, linux-kernel

On 11/9/20 4:19 AM, Michal Simek wrote:
> 
> 
> On 29. 10. 20 17:16, Jens Axboe wrote:
>> Wire up TIF_NOTIFY_SIGNAL handling for microblaze.
>>
>> Cc: Michal Simek <monstr@monstr.eu>
>> 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/microblaze/include/asm/thread_info.h | 2 ++
>>  arch/microblaze/kernel/signal.c           | 3 ++-
>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
>> index ad8e8fcb90d3..44f5ca331862 100644
>> --- a/arch/microblaze/include/asm/thread_info.h
>> +++ b/arch/microblaze/include/asm/thread_info.h
>> @@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
>>  #define TIF_NEED_RESCHED	3 /* rescheduling necessary */
>>  /* restore singlestep on return to user mode */
>>  #define TIF_SINGLESTEP		4
>> +#define TIF_NOTIFY_SIGNAL	5	/* signal notifications exist */
>>  #define TIF_MEMDIE		6	/* is terminating due to OOM killer */
>>  #define TIF_SYSCALL_AUDIT	9       /* syscall auditing active */
>>  #define TIF_SECCOMP		10      /* secure computing */
>> @@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
>>  #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)
>>  #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
>>  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
>>  #define _TIF_SECCOMP		(1 << TIF_SECCOMP)
>> diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
>> index f11a0ccccabc..5a8d173d7b75 100644
>> --- a/arch/microblaze/kernel/signal.c
>> +++ b/arch/microblaze/kernel/signal.c
>> @@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
>>  
>>  asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
>>  {
>> -	if (test_thread_flag(TIF_SIGPENDING))
>> +	if (test_thread_flag(TIF_SIGPENDING) ||
>> +	    test_thread_flag(TIF_NOTIFY_SIGNAL))
>>  		do_signal(regs, in_syscall);
>>  
>>  	if (test_thread_flag(TIF_NOTIFY_RESUME))
>>
> 
> Applied for 5.11.

Would you mind if I carry this patch with an ack? I've got further fixes
and cleanups that are enabled once all archs have added support.

-- 
Jens Axboe


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

* Re: [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
  2020-11-09 14:17   ` Jens Axboe
@ 2020-11-09 14:18     ` Michal Simek
  2020-11-09 14:37       ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Simek @ 2020-11-09 14:18 UTC (permalink / raw)
  To: Jens Axboe, linux-kernel



On 09. 11. 20 15:17, Jens Axboe wrote:
> On 11/9/20 4:19 AM, Michal Simek wrote:
>>
>>
>> On 29. 10. 20 17:16, Jens Axboe wrote:
>>> Wire up TIF_NOTIFY_SIGNAL handling for microblaze.
>>>
>>> Cc: Michal Simek <monstr@monstr.eu>
>>> 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/microblaze/include/asm/thread_info.h | 2 ++
>>>  arch/microblaze/kernel/signal.c           | 3 ++-
>>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
>>> index ad8e8fcb90d3..44f5ca331862 100644
>>> --- a/arch/microblaze/include/asm/thread_info.h
>>> +++ b/arch/microblaze/include/asm/thread_info.h
>>> @@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
>>>  #define TIF_NEED_RESCHED	3 /* rescheduling necessary */
>>>  /* restore singlestep on return to user mode */
>>>  #define TIF_SINGLESTEP		4
>>> +#define TIF_NOTIFY_SIGNAL	5	/* signal notifications exist */
>>>  #define TIF_MEMDIE		6	/* is terminating due to OOM killer */
>>>  #define TIF_SYSCALL_AUDIT	9       /* syscall auditing active */
>>>  #define TIF_SECCOMP		10      /* secure computing */
>>> @@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
>>>  #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)
>>>  #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
>>>  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
>>>  #define _TIF_SECCOMP		(1 << TIF_SECCOMP)
>>> diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
>>> index f11a0ccccabc..5a8d173d7b75 100644
>>> --- a/arch/microblaze/kernel/signal.c
>>> +++ b/arch/microblaze/kernel/signal.c
>>> @@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
>>>  
>>>  asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
>>>  {
>>> -	if (test_thread_flag(TIF_SIGPENDING))
>>> +	if (test_thread_flag(TIF_SIGPENDING) ||
>>> +	    test_thread_flag(TIF_NOTIFY_SIGNAL))
>>>  		do_signal(regs, in_syscall);
>>>  
>>>  	if (test_thread_flag(TIF_NOTIFY_RESUME))
>>>
>>
>> Applied for 5.11.
> 
> Would you mind if I carry this patch with an ack? I've got further fixes
> and cleanups that are enabled once all archs have added support.
> 

ok. Not a problem. Will drop it from my queue and feel free to add my

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


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

* Re: [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL
  2020-11-09 14:18     ` Michal Simek
@ 2020-11-09 14:37       ` Jens Axboe
  0 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2020-11-09 14:37 UTC (permalink / raw)
  To: Michal Simek, linux-kernel

On 11/9/20 7:18 AM, Michal Simek wrote:
> 
> 
> On 09. 11. 20 15:17, Jens Axboe wrote:
>> On 11/9/20 4:19 AM, Michal Simek wrote:
>>>
>>>
>>> On 29. 10. 20 17:16, Jens Axboe wrote:
>>>> Wire up TIF_NOTIFY_SIGNAL handling for microblaze.
>>>>
>>>> Cc: Michal Simek <monstr@monstr.eu>
>>>> 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/microblaze/include/asm/thread_info.h | 2 ++
>>>>  arch/microblaze/kernel/signal.c           | 3 ++-
>>>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h
>>>> index ad8e8fcb90d3..44f5ca331862 100644
>>>> --- a/arch/microblaze/include/asm/thread_info.h
>>>> +++ b/arch/microblaze/include/asm/thread_info.h
>>>> @@ -107,6 +107,7 @@ static inline struct thread_info *current_thread_info(void)
>>>>  #define TIF_NEED_RESCHED	3 /* rescheduling necessary */
>>>>  /* restore singlestep on return to user mode */
>>>>  #define TIF_SINGLESTEP		4
>>>> +#define TIF_NOTIFY_SIGNAL	5	/* signal notifications exist */
>>>>  #define TIF_MEMDIE		6	/* is terminating due to OOM killer */
>>>>  #define TIF_SYSCALL_AUDIT	9       /* syscall auditing active */
>>>>  #define TIF_SECCOMP		10      /* secure computing */
>>>> @@ -119,6 +120,7 @@ static inline struct thread_info *current_thread_info(void)
>>>>  #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)
>>>>  #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
>>>>  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
>>>>  #define _TIF_SECCOMP		(1 << TIF_SECCOMP)
>>>> diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
>>>> index f11a0ccccabc..5a8d173d7b75 100644
>>>> --- a/arch/microblaze/kernel/signal.c
>>>> +++ b/arch/microblaze/kernel/signal.c
>>>> @@ -313,7 +313,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall)
>>>>  
>>>>  asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall)
>>>>  {
>>>> -	if (test_thread_flag(TIF_SIGPENDING))
>>>> +	if (test_thread_flag(TIF_SIGPENDING) ||
>>>> +	    test_thread_flag(TIF_NOTIFY_SIGNAL))
>>>>  		do_signal(regs, in_syscall);
>>>>  
>>>>  	if (test_thread_flag(TIF_NOTIFY_RESUME))
>>>>
>>>
>>> Applied for 5.11.
>>
>> Would you mind if I carry this patch with an ack? I've got further fixes
>> and cleanups that are enabled once all archs have added support.
>>
> 
> ok. Not a problem. Will drop it from my queue and feel free to add my
> 
> Acked-by: Michal Simek <michal.simek@xilinx.com>

Great, thank you!

-- 
Jens Axboe


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 16:16 [PATCH] microblaze: add support for TIF_NOTIFY_SIGNAL Jens Axboe
2020-11-05 16:18 ` Jens Axboe
2020-11-05 16:42   ` Michal Simek
2020-11-05 17:15     ` Jens Axboe
2020-11-09 11:19 ` Michal Simek
2020-11-09 14:17   ` Jens Axboe
2020-11-09 14:18     ` Michal Simek
2020-11-09 14:37       ` Jens Axboe

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).