On Wed, Feb 21, 2024 at 1:20 AM K Prateek Nayak <kprateek.na...@amd.com> wrote:
>
> Add support for TIF_NOTIFY_IPI on C-SKY. With TIF_NOTIFY_IPI, a sender
> sending an IPI to an idle CPU in TIF_POLLING mode will set the
> TIF_NOTIFY_IPI flag in the target's idle tasks's thread_info to pull the
> CPU out of idle, as opposed to setting TIF_NEED_RESCHED previously. This
> avoids spurious calls to schedule_idle() in cases where an IPI does not
> necessarily wake up a task on the idle CPU.
>
> Cc: Guo Ren <guo...@kernel.org>
> Cc: "Rafael J. Wysocki" <raf...@kernel.org>
> Cc: Daniel Lezcano <daniel.lezc...@linaro.org>
> Cc: Ingo Molnar <mi...@redhat.com>
> Cc: Peter Zijlstra <pet...@infradead.org>
> Cc: Juri Lelli <juri.le...@redhat.com>
> Cc: Vincent Guittot <vincent.guit...@linaro.org>
> Cc: Dietmar Eggemann <dietmar.eggem...@arm.com>
> Cc: Steven Rostedt <rost...@goodmis.org>
> Cc: Ben Segall <bseg...@google.com>
> Cc: Mel Gorman <mgor...@suse.de>
> Cc: Daniel Bristot de Oliveira <bris...@redhat.com>
> Cc: Valentin Schneider <vschn...@redhat.com>
> Cc: K Prateek Nayak <kprateek.na...@amd.com>
> Cc: linux-c...@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux...@vger.kernel.org
> Signed-off-by: K Prateek Nayak <kprateek.na...@amd.com>
> ---
>  arch/csky/include/asm/thread_info.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/csky/include/asm/thread_info.h 
> b/arch/csky/include/asm/thread_info.h
> index b5ed788f0c68..9bc7a037c476 100644
> --- a/arch/csky/include/asm/thread_info.h
> +++ b/arch/csky/include/asm/thread_info.h
> @@ -61,6 +61,7 @@ static inline struct thread_info *current_thread_info(void)
>  #define TIF_SYSCALL_TRACEPOINT 5       /* syscall tracepoint instrumentation 
> */
>  #define TIF_SYSCALL_AUDIT      6       /* syscall auditing */
>  #define TIF_NOTIFY_SIGNAL      7       /* signal notifications exist */
> +#define TIF_NOTIFY_IPI         8       /* Pending IPI on TIF_POLLLING idle 
> CPU */
>  #define TIF_POLLING_NRFLAG     16      /* poll_idle() is TIF_NEED_RESCHED */
>  #define TIF_MEMDIE             18      /* is terminating due to OOM killer */
>  #define TIF_RESTORE_SIGMASK    20      /* restore signal mask in do_signal() 
> */
> @@ -73,6 +74,7 @@ static inline struct thread_info *current_thread_info(void)
>  #define _TIF_SYSCALL_TRACEPOINT        (1 << TIF_SYSCALL_TRACEPOINT)
>  #define _TIF_SYSCALL_AUDIT     (1 << TIF_SYSCALL_AUDIT)
>  #define _TIF_NOTIFY_SIGNAL     (1 << TIF_NOTIFY_SIGNAL)
> +#define _TIF_NOTIFY_IPI                (1 << TIF_NOTIFY_IPI)
>  #define _TIF_UPROBE            (1 << TIF_UPROBE)
>  #define _TIF_POLLING_NRFLAG    (1 << TIF_POLLING_NRFLAG)
>  #define _TIF_MEMDIE            (1 << TIF_MEMDIE)
> --
> 2.34.1
>
LGTM

Acked-by: Guo Ren <guo...@kernel.org>

-- 
Best Regards
 Guo Ren

Reply via email to