Skip to content

Commit a36dc37

Browse files
dedekindrafaeljw
authored andcommitted
intel_idle: Remove the 'preferred_cstates' parameter
Remove the 'preferred_cstates' module parameter as it is not really useful. The parameter currently only affects Alder Lake, where it controls C1/C1E preference, with C1E being the default. The parameter does not support any other platform. For example, Meteor Lake has a similar C1/C1E limitation, but the parameter does not support Meteor Lake. This indicates that the parameter is not very useful. Generally, independent C1 and C1E are important for server platforms where low latency is key. However, they are not as important for client platforms, like Alder Lake, where C1E providing better energy savings is generally preferred. The parameter was originally introduced for Sapphire Rapids Xeon: da0e58c intel_idle: add 'preferred_cstates' module argument Later it was added to Alder Lake: d1cf8bb ("intel_idle: Add AlderLake support") But it was removed from Sapphire Rapids when firmware fixed the C1/C1E limitation: 1548fac ("intel_idle: make SPR C1 and C1E be independent") So Alder Lake is the only platform left where this parameter has any effect. Remove this parameter to simplify the driver and reduce maintenance burden. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Link: https://patch.msgid.link/20251215111300.132803-1-dedekind1@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 25ff690 commit a36dc37

1 file changed

Lines changed: 0 additions & 36 deletions

File tree

drivers/idle/intel_idle.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ static struct cpuidle_driver intel_idle_driver = {
7070
/* intel_idle.max_cstate=0 disables driver */
7171
static int max_cstate = CPUIDLE_STATE_MAX - 1;
7272
static unsigned int disabled_states_mask __read_mostly;
73-
static unsigned int preferred_states_mask __read_mostly;
7473
static bool force_irq_on __read_mostly;
7574
static bool ibrs_off __read_mostly;
7675

@@ -2049,25 +2048,6 @@ static void __init skx_idle_state_table_update(void)
20492048
}
20502049
}
20512050

2052-
/**
2053-
* adl_idle_state_table_update - Adjust AlderLake idle states table.
2054-
*/
2055-
static void __init adl_idle_state_table_update(void)
2056-
{
2057-
/* Check if user prefers C1 over C1E. */
2058-
if (preferred_states_mask & BIT(1) && !(preferred_states_mask & BIT(2))) {
2059-
cpuidle_state_table[0].flags &= ~CPUIDLE_FLAG_UNUSABLE;
2060-
cpuidle_state_table[1].flags |= CPUIDLE_FLAG_UNUSABLE;
2061-
2062-
/* Disable C1E by clearing the "C1E promotion" bit. */
2063-
c1e_promotion = C1E_PROMOTION_DISABLE;
2064-
return;
2065-
}
2066-
2067-
/* Make sure C1E is enabled by default */
2068-
c1e_promotion = C1E_PROMOTION_ENABLE;
2069-
}
2070-
20712051
/**
20722052
* spr_idle_state_table_update - Adjust Sapphire Rapids idle states table.
20732053
*/
@@ -2174,11 +2154,6 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
21742154
case INTEL_EMERALDRAPIDS_X:
21752155
spr_idle_state_table_update();
21762156
break;
2177-
case INTEL_ALDERLAKE:
2178-
case INTEL_ALDERLAKE_L:
2179-
case INTEL_ATOM_GRACEMONT:
2180-
adl_idle_state_table_update();
2181-
break;
21822157
case INTEL_ATOM_SILVERMONT:
21832158
case INTEL_ATOM_AIRMONT:
21842159
byt_cht_auto_demotion_disable();
@@ -2532,17 +2507,6 @@ module_param(max_cstate, int, 0444);
25322507
*/
25332508
module_param_named(states_off, disabled_states_mask, uint, 0444);
25342509
MODULE_PARM_DESC(states_off, "Mask of disabled idle states");
2535-
/*
2536-
* Some platforms come with mutually exclusive C-states, so that if one is
2537-
* enabled, the other C-states must not be used. Example: C1 and C1E on
2538-
* Sapphire Rapids platform. This parameter allows for selecting the
2539-
* preferred C-states among the groups of mutually exclusive C-states - the
2540-
* selected C-states will be registered, the other C-states from the mutually
2541-
* exclusive group won't be registered. If the platform has no mutually
2542-
* exclusive C-states, this parameter has no effect.
2543-
*/
2544-
module_param_named(preferred_cstates, preferred_states_mask, uint, 0444);
2545-
MODULE_PARM_DESC(preferred_cstates, "Mask of preferred idle states");
25462510
/*
25472511
* Debugging option that forces the driver to enter all C-states with
25482512
* interrupts enabled. Does not apply to C-states with

0 commit comments

Comments
 (0)