Skip to content

Commit

Permalink
intel_idle: Build fix
Browse files Browse the repository at this point in the history
[ Upstream commit 4d91614 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Peter Zijlstra authored and gregkh committed Dec 16, 2020
1 parent d00ee4d commit eda5851
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions drivers/idle/intel_idle.c
Expand Up @@ -1136,6 +1136,20 @@ static bool __init intel_idle_max_cstate_reached(int cstate)
return false;
}

static bool __init intel_idle_state_needs_timer_stop(struct cpuidle_state *state)
{
unsigned long eax = flg2MWAIT(state->flags);

if (boot_cpu_has(X86_FEATURE_ARAT))
return false;

/*
* Switch over to one-shot tick broadcast if the target C-state
* is deeper than C1.
*/
return !!((eax >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK);
}

#ifdef CONFIG_ACPI_PROCESSOR_CSTATE
#include <acpi/processor.h>

Expand Down Expand Up @@ -1206,20 +1220,6 @@ static bool __init intel_idle_acpi_cst_extract(void)
return false;
}

static bool __init intel_idle_state_needs_timer_stop(struct cpuidle_state *state)
{
unsigned long eax = flg2MWAIT(state->flags);

if (boot_cpu_has(X86_FEATURE_ARAT))
return false;

/*
* Switch over to one-shot tick broadcast if the target C-state
* is deeper than C1.
*/
return !!((eax >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK);
}

static void __init intel_idle_init_cstates_acpi(struct cpuidle_driver *drv)
{
int cstate, limit = min_t(int, CPUIDLE_STATE_MAX, acpi_state_table.count);
Expand Down

0 comments on commit eda5851

Please sign in to comment.