Skip to content

Commit

Permalink
intel_idle: Add force_irq_on module param
Browse files Browse the repository at this point in the history
For testing purposes.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20230112195541.967699392@infradead.org
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 13, 2023
1 parent f18b0d7 commit 365bd03
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,9 @@ static bool __init intel_idle_verify_cstate(unsigned int mwait_hint)
return true;
}

static bool force_irq_on __read_mostly;
module_param(force_irq_on, bool, 0444);

static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
{
int cstate;
Expand Down Expand Up @@ -1889,8 +1892,10 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
/* Structure copy. */
drv->states[drv->state_count] = cpuidle_state_table[cstate];

if (cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IRQ_ENABLE)
if ((cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IRQ_ENABLE) || force_irq_on) {
printk("intel_idle: forced intel_idle_irq for state %d\n", cstate);
drv->states[drv->state_count].enter = intel_idle_irq;
}

if (cpu_feature_enabled(X86_FEATURE_KERNEL_IBRS) &&
cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IBRS) {
Expand Down

0 comments on commit 365bd03

Please sign in to comment.