Skip to contentSkip to conversation

intel_idle: Update arguments of mwait_idle_with_hints()

PATCH Applied Uros Bizjak 3 participants 3 messages Jun 9, 2025 – Jun 10, 2025 Intel idle driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel_idle: Update arguments of mwait_idle_with_hints()

Commit a17b37a3f416 ("x86/idle: Change arguments of mwait_idle_with_hints() to u32") changed the type of arguments of mwait_idle_with_hints() from unsigned long to u32. Change the type of variables in the call to mwait_idle_with_hints() to unsigned int to follow the change.

Cc "Rafael J. Wysocki" <[email protected]>
Cc Artem Bityutskiy <[email protected]>
Cc Len Brown <[email protected]>
---
 drivers/idle/intel_idle.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/idle/intel_idle.c +4 -4
index 8ccb483204fa..f3ab1d6e3276 100644
@@ -152,8 +152,8 @@ static __always_inline int __intel_idle(struct cpuidle_device *dev,
 					int index, bool irqoff)
 {
 	struct cpuidle_state *state = &drv->states[index];
-	unsigned long eax = flg2MWAIT(state->flags);
-	unsigned long ecx = 1*irqoff; /* break on interrupt flag */
+	unsigned int eax = flg2MWAIT(state->flags);
+	unsigned int ecx = 1*irqoff; /* break on interrupt flag */
 
 	mwait_idle_with_hints(eax, ecx);
 
@@ -226,9 +226,9 @@ static __cpuidle int intel_idle_xstate(struct cpuidle_device *dev,
 static __cpuidle int intel_idle_s2idle(struct cpuidle_device *dev,
 				       struct cpuidle_driver *drv, int index)
 {
-	unsigned long ecx = 1; /* break on interrupt flag */
 	struct cpuidle_state *state = &drv->states[index];
-	unsigned long eax = flg2MWAIT(state->flags);
+	unsigned int eax = flg2MWAIT(state->flags);
+	unsigned int ecx = 1; /* break on interrupt flag */
 
 	if (state->flags & CPUIDLE_FLAG_INIT_XSTATE)
 		fpu_idle_fpregs();
Signature · 1 line
2.49.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Uros Bizjak

Commit a17b37a3f416 ("x86/idle: Change arguments of mwait_idle_with_hints() to u32") changed the type of arguments of mwait_idle_with_hints() from unsigned long to u32. Change the type of variables in the call to mwait_idle_with_hints() to unsigned int to follow the change.

Cc "Rafael J. Wysocki" <[email protected]>
Cc Artem Bityutskiy <[email protected]>
Cc Len Brown <[email protected]>
maintainer Applied
#2 lore raw
Quoted 7 lines · Artem Bityutskiy
Quoted 5 lines · Uros Bizjak

Commit a17b37a3f416 ("x86/idle: Change arguments of mwait_idle_with_hints() to u32") changed the type of arguments of mwait_idle_with_hints() from unsigned long to u32. Change the type of variables in the call to mwait_idle_with_hints() to unsigned int to follow the change.

Quoted 6 lines
Quoted 4 lines
Cc "Rafael J. Wysocki" <[email protected]>
Cc Artem Bityutskiy <[email protected]>
Cc Len Brown <[email protected]>

Applied as 6.16-rc material, thanks!