[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1700488898-12431-6-git-send-email-mihai.carabas@oracle.com>
Date: Mon, 20 Nov 2023 16:01:36 +0200
From: Mihai Carabas <mihai.carabas@...cle.com>
To: linux-arm-kernel@...ts.infradead.org
Cc: kvm@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, catalin.marinas@....com,
will@...nel.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, x86@...nel.org, hpa@...or.com, pbonzini@...hat.com,
wanpengli@...cent.com, vkuznets@...hat.com, rafael@...nel.org,
daniel.lezcano@...aro.org, akpm@...ux-foundation.org,
pmladek@...e.com, peterz@...radead.org, dianders@...omium.org,
npiggin@...il.com, rick.p.edgecombe@...el.com,
joao.m.martins@...cle.com, juerg.haefliger@...onical.com,
mic@...ikod.net, mihai.carabas@...cle.com, arnd@...db.de,
ankur.a.arora@...cle.com
Subject: [PATCH 5/7] arm64: Define TIF_POLLING_NRFLAG
From: Joao Martins <joao.m.martins@...cle.com>
The default idle method for arm64 is WFI and it therefore
unconditionally requires the reschedule interrupt when idle.
Commit 842514849a61 ("arm64: Remove TIF_POLLING_NRFLAG") had
reverted it because WFI was the only idle method. ARM64 support
for haltpoll means that poll_idle() polls for TIF_POLLING_NRFLAG,
so define on arm64 *only if* haltpoll is built, using the same bit.
Signed-off-by: Joao Martins <joao.m.martins@...cle.com>
Signed-off-by: Mihai Carabas <mihai.carabas@...cle.com>
---
arch/arm64/include/asm/thread_info.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index 2c62ab3aeb84..c5fd3107c8ce 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -69,6 +69,9 @@ struct thread_info {
#define TIF_SYSCALL_TRACEPOINT 10 /* syscall tracepoint for ftrace */
#define TIF_SECCOMP 11 /* syscall secure computing */
#define TIF_SYSCALL_EMU 12 /* syscall emulation active */
+#if IS_ENABLED(CONFIG_HALTPOLL_CPUIDLE) || IS_ENABLED(CONFIG_HALTPOLL_CPUIDLE_MODULE)
+#define TIF_POLLING_NRFLAG 16 /* poll_idle() polls TIF_NEED_RESCHED */
+#endif
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
#define TIF_FREEZE 19
#define TIF_RESTORE_SIGMASK 20
@@ -94,6 +97,9 @@ struct thread_info {
#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
+#if IS_ENABLED(CONFIG_HALTPOLL_CPUIDLE) || IS_ENABLED(CONFIG_HALTPOLL_CPUIDLE_MODULE)
+#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
+#endif
#define _TIF_UPROBE (1 << TIF_UPROBE)
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_32BIT (1 << TIF_32BIT)
--
1.8.3.1
Powered by blists - more mailing lists