Skip to content

Commit 365bd03

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
intel_idle: Add force_irq_on module param
For testing purposes. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Tested-by: Tony Lindgren <[email protected]> Tested-by: Ulf Hansson <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f18b0d7 commit 365bd03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/idle/intel_idle.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1837,6 +1837,9 @@ static bool __init intel_idle_verify_cstate(unsigned int mwait_hint)
18371837
return true;
18381838
}
18391839

1840+
static bool force_irq_on __read_mostly;
1841+
module_param(force_irq_on, bool, 0444);
1842+
18401843
static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
18411844
{
18421845
int cstate;
@@ -1889,8 +1892,10 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
18891892
/* Structure copy. */
18901893
drv->states[drv->state_count] = cpuidle_state_table[cstate];
18911894

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

18951900
if (cpu_feature_enabled(X86_FEATURE_KERNEL_IBRS) &&
18961901
cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IBRS) {

0 commit comments

Comments
 (0)