diff options
| author | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-05-01 15:20:08 -0700 | 
| commit | 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e (patch) | |
| tree | d57f3a63479a07b4e0cece029886e76e04feb984 /drivers/idle/intel_idle.c | |
| parent | 5dc63e56a9cf8df0b59c234a505a1653f1bdf885 (diff) | |
| parent | 53bea86b5712c7491bb3dae12e271666df0a308c (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.4 merge window.
Diffstat (limited to 'drivers/idle/intel_idle.c')
| -rw-r--r-- | drivers/idle/intel_idle.c | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index cfeb24d40d37..938c17f25d94 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -168,13 +168,7 @@ static __cpuidle int intel_idle_irq(struct cpuidle_device *dev,  	raw_local_irq_enable();  	ret = __intel_idle(dev, drv, index); - -	/* -	 * The lockdep hardirqs state may be changed to 'on' with timer -	 * tick interrupt followed by __do_softirq(). Use local_irq_disable() -	 * to keep the hardirqs state correct. -	 */ -	local_irq_disable(); +	raw_local_irq_disable();  	return ret;  } @@ -187,12 +181,12 @@ static __cpuidle int intel_idle_ibrs(struct cpuidle_device *dev,  	int ret;  	if (smt_active) -		wrmsrl(MSR_IA32_SPEC_CTRL, 0); +		native_wrmsrl(MSR_IA32_SPEC_CTRL, 0);  	ret = __intel_idle(dev, drv, index);  	if (smt_active) -		wrmsrl(MSR_IA32_SPEC_CTRL, spec_ctrl); +		native_wrmsrl(MSR_IA32_SPEC_CTRL, spec_ctrl);  	return ret;  } @@ -1430,6 +1424,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {  	X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,		&idle_cpu_adl_l),  	X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N,		&idle_cpu_adl_n),  	X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X,	&idle_cpu_spr), +	X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X,	&idle_cpu_spr),  	X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNL,	&idle_cpu_knl),  	X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNM,	&idle_cpu_knl),  	X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT,	&idle_cpu_bxt), @@ -1843,6 +1838,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; @@ -1862,6 +1860,7 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)  		skx_idle_state_table_update();  		break;  	case INTEL_FAM6_SAPPHIRERAPIDS_X: +	case INTEL_FAM6_EMERALDRAPIDS_X:  		spr_idle_state_table_update();  		break;  	case INTEL_FAM6_ALDERLAKE: @@ -1895,8 +1894,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) {  |