diff mbox series

[v7,07/10] arm64: define TIF_POLLING_NRFLAG

Message ID 20240830222844.1601170-8-ankur.a.arora@oracle.com (mailing list archive)
State New
Headers show
Series Enable haltpoll on arm64 | expand

Commit Message

Ankur Arora Aug. 30, 2024, 10:28 p.m. UTC
From: Joao Martins <joao.m.martins@oracle.com>

Commit 842514849a61 ("arm64: Remove TIF_POLLING_NRFLAG") had removed
TIF_POLLING_NRFLAG because arm64 only supported non-polled idling via
cpu_do_idle().

To add support for polling via cpuidle-haltpoll, we want to use the
standard poll_idle() interface, which sets TIF_POLLING_NRFLAG while
polling.

Reuse the same bit to define TIF_POLLING_NRFLAG.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
---
 arch/arm64/include/asm/thread_info.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Will Deacon Sept. 3, 2024, 8:10 a.m. UTC | #1
On Fri, Aug 30, 2024 at 03:28:41PM -0700, Ankur Arora wrote:
> From: Joao Martins <joao.m.martins@oracle.com>
> 
> Commit 842514849a61 ("arm64: Remove TIF_POLLING_NRFLAG") had removed
> TIF_POLLING_NRFLAG because arm64 only supported non-polled idling via
> cpu_do_idle().
> 
> To add support for polling via cpuidle-haltpoll, we want to use the
> standard poll_idle() interface, which sets TIF_POLLING_NRFLAG while
> polling.
> 
> Reuse the same bit to define TIF_POLLING_NRFLAG.
> 
> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
> Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
> Reviewed-by: Christoph Lameter <cl@linux.com>
> Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
> ---
>  arch/arm64/include/asm/thread_info.h | 2 ++
>  1 file changed, 2 insertions(+)

Acked-by: Will Deacon <will@kernel.org>

Will
Ankur Arora Sept. 3, 2024, 9:13 p.m. UTC | #2
Will Deacon <will@kernel.org> writes:

> On Fri, Aug 30, 2024 at 03:28:41PM -0700, Ankur Arora wrote:
>> From: Joao Martins <joao.m.martins@oracle.com>
>>
>> Commit 842514849a61 ("arm64: Remove TIF_POLLING_NRFLAG") had removed
>> TIF_POLLING_NRFLAG because arm64 only supported non-polled idling via
>> cpu_do_idle().
>>
>> To add support for polling via cpuidle-haltpoll, we want to use the
>> standard poll_idle() interface, which sets TIF_POLLING_NRFLAG while
>> polling.
>>
>> Reuse the same bit to define TIF_POLLING_NRFLAG.
>>
>> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
>> Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
>> Reviewed-by: Christoph Lameter <cl@linux.com>
>> Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
>> ---
>>  arch/arm64/include/asm/thread_info.h | 2 ++
>>  1 file changed, 2 insertions(+)
>
> Acked-by: Will Deacon <will@kernel.org>

Thanks!

--
ankur
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index e72a3bf9e563..23ff72168e48 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -69,6 +69,7 @@  void arch_setup_new_exec(void);
 #define TIF_SYSCALL_TRACEPOINT	10	/* syscall tracepoint for ftrace */
 #define TIF_SECCOMP		11	/* syscall secure computing */
 #define TIF_SYSCALL_EMU		12	/* syscall emulation active */
+#define TIF_POLLING_NRFLAG	16	/* set while polling in poll_idle() */
 #define TIF_MEMDIE		18	/* is terminating due to OOM killer */
 #define TIF_FREEZE		19
 #define TIF_RESTORE_SIGMASK	20
@@ -91,6 +92,7 @@  void arch_setup_new_exec(void);
 #define _TIF_SYSCALL_TRACEPOINT	(1 << TIF_SYSCALL_TRACEPOINT)
 #define _TIF_SECCOMP		(1 << TIF_SECCOMP)
 #define _TIF_SYSCALL_EMU	(1 << TIF_SYSCALL_EMU)
+#define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
 #define _TIF_UPROBE		(1 << TIF_UPROBE)
 #define _TIF_SINGLESTEP		(1 << TIF_SINGLESTEP)
 #define _TIF_32BIT		(1 << TIF_32BIT)