diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index 2da90548d8..72da2f2584 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -2075,12 +2075,6 @@ compression is selected at build time from Kconfig. ### ple_window (Intel) > `= ` -### preferred-cstates (x86) -> `= ( | List of ( C1 | C1E | C2 | ... )` - -This is a mask of C-states which are to be used preferably. This option is -applicable only on hardware were certain C-states are exclusive of one another. - ### probe-port-aliases (x86) > `= ` diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c index 8469d45db0..2835cf56d3 100644 --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -72,19 +72,6 @@ boolean_param("mwait-idle", opt_mwait_idle); static unsigned int mwait_substates; -/* - * Some platforms come with mutually exclusive C-states, so that if one is - * enabled, the other C-states must not be used. Example: C1 and C1E on - * Sapphire Rapids platform. This parameter allows for selecting the - * preferred C-states among the groups of mutually exclusive C-states - the - * selected C-states will be registered, the other C-states from the mutually - * exclusive group won't be registered. If the platform has no mutually - * exclusive C-states, this parameter has no effect. - */ -static unsigned int __ro_after_init preferred_states_mask; -static char __initdata preferred_states[64]; -string_param("preferred-cstates", preferred_states); - #define LAPIC_TIMER_ALWAYS_RELIABLE 0xFFFFFFFF /* Reliable LAPIC Timer States, bit 1 for C1 etc. Default to only C1. */ static unsigned int lapic_timer_reliable_states = (1 << 1); @@ -1511,28 +1498,6 @@ static void __init skx_idle_state_table_update(void) } } -/* - * adl_idle_state_table_update - Adjust AlderLake idle states table. - */ -static void __init adl_idle_state_table_update(void) -{ - /* Check if user prefers C1 over C1E. */ - if ((preferred_states_mask & BIT(1, U)) && - !(preferred_states_mask & BIT(2, U))) { - adl_cstates[0].flags &= ~CPUIDLE_FLAG_DISABLED; - adl_cstates[1].flags |= CPUIDLE_FLAG_DISABLED; - adl_l_cstates[0].flags &= ~CPUIDLE_FLAG_DISABLED; - adl_l_cstates[1].flags |= CPUIDLE_FLAG_DISABLED; - - /* Disable C1E by clearing the "C1E promotion" bit. */ - icpu.c1e_promotion = C1E_PROMOTION_DISABLE; - return; - } - - /* Make sure C1E is enabled by default */ - icpu.c1e_promotion = C1E_PROMOTION_ENABLE; -} - /* * spr_idle_state_table_update - Adjust Sapphire Rapids idle states table. */ @@ -1579,11 +1544,6 @@ static void __init mwait_idle_state_table_update(void) case INTEL_EMERALDRAPIDS_X: spr_idle_state_table_update(); break; - case INTEL_ALDERLAKE: - case INTEL_ALDERLAKE_L: - case INTEL_ATOM_GRACEMONT: - adl_idle_state_table_update(); - break; } } @@ -1592,7 +1552,6 @@ static int __init mwait_idle_probe(void) unsigned int eax, ebx, ecx; const struct x86_cpu_id *id; const struct idle_cpu *idle_cpu; - const char *str; if (boot_cpu_data.vendor != X86_VENDOR_INTEL) return -ENODEV; @@ -1635,39 +1594,6 @@ static int __init mwait_idle_probe(void) pr_debug(PREFIX "lapic_timer_reliable_states %#x\n", lapic_timer_reliable_states); - str = preferred_states; - if (isdigit(str[0])) - preferred_states_mask = simple_strtoul(str, &str, 0); - else if (str[0]) - { - const char *ss; - - do { - const struct cpuidle_state *state = idle_cpu->state_table; - unsigned int bit = 1; - - ss = strchr(str, ','); - if (!ss) - ss = strchr(str, '\0'); - - for (; state->name[0]; ++state) { - bit <<= 1; - if (!cmdline_strcmp(str, state->name)) { - preferred_states_mask |= bit; - break; - } - } - if (!state->name[0]) - break; - - str = ss + 1; - } while (*ss); - - str -= str == ss + 1; - } - if (str[0]) - printk("unrecognized \"preferred-cstates=%s\"\n", str); - mwait_idle_state_table_update(); return 0;