Skip to content

Commit 4d91614

Browse files
author
Peter Zijlstra
committed
intel_idle: Build fix
Because CONFIG_ soup. Fixes: 6e1d2bc ("intel_idle: Fix intel_idle() vs tracing") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20201130115402.GO3040@hirez.programming.kicks-ass.net
1 parent 6e1d2bc commit 4d91614

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

drivers/idle/intel_idle.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,20 @@ static bool __init intel_idle_max_cstate_reached(int cstate)
11401140
return false;
11411141
}
11421142

1143+
static bool __init intel_idle_state_needs_timer_stop(struct cpuidle_state *state)
1144+
{
1145+
unsigned long eax = flg2MWAIT(state->flags);
1146+
1147+
if (boot_cpu_has(X86_FEATURE_ARAT))
1148+
return false;
1149+
1150+
/*
1151+
* Switch over to one-shot tick broadcast if the target C-state
1152+
* is deeper than C1.
1153+
*/
1154+
return !!((eax >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK);
1155+
}
1156+
11431157
#ifdef CONFIG_ACPI_PROCESSOR_CSTATE
11441158
#include <acpi/processor.h>
11451159

@@ -1210,20 +1224,6 @@ static bool __init intel_idle_acpi_cst_extract(void)
12101224
return false;
12111225
}
12121226

1213-
static bool __init intel_idle_state_needs_timer_stop(struct cpuidle_state *state)
1214-
{
1215-
unsigned long eax = flg2MWAIT(state->flags);
1216-
1217-
if (boot_cpu_has(X86_FEATURE_ARAT))
1218-
return false;
1219-
1220-
/*
1221-
* Switch over to one-shot tick broadcast if the target C-state
1222-
* is deeper than C1.
1223-
*/
1224-
return !!((eax >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK);
1225-
}
1226-
12271227
static void __init intel_idle_init_cstates_acpi(struct cpuidle_driver *drv)
12281228
{
12291229
int cstate, limit = min_t(int, CPUIDLE_STATE_MAX, acpi_state_table.count);

0 commit comments

Comments
 (0)