Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4236282 authored by Len Brown's avatar Len Brown
Browse files

intel_idle: delete substates DEBUG modparam



it isn't useful anymore

Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 26717172
Loading
Loading
Loading
Loading
+7 −13
Original line number Original line Diff line number Diff line
@@ -79,7 +79,7 @@ static struct cpuidle_driver intel_idle_driver = {
static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1;
static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1;
static int power_policy = 7; /* 0 = max perf; 15 = max powersave */
static int power_policy = 7; /* 0 = max perf; 15 = max powersave */


static unsigned int substates;
static unsigned int mwait_substates;
static int (*choose_substate)(int);
static int (*choose_substate)(int);


/* Reliable LAPIC Timer States, bit 1 for C1 etc.  */
/* Reliable LAPIC Timer States, bit 1 for C1 etc.  */
@@ -184,7 +184,8 @@ static int choose_tunable_substate(int cstate)
	power_policy &= 0xF;	/* valid range: 0-15 */
	power_policy &= 0xF;	/* valid range: 0-15 */
	cstate &= 7;	/* valid range: 0-7 */
	cstate &= 7;	/* valid range: 0-7 */


	num_substates = (substates >> ((cstate) * 4)) & MWAIT_SUBSTATE_MASK;
	num_substates = (mwait_substates >> ((cstate) * 4))
				& MWAIT_SUBSTATE_MASK;


	if (num_substates <= 1)
	if (num_substates <= 1)
		return 0;
		return 0;
@@ -259,7 +260,7 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state)
 */
 */
static int intel_idle_probe(void)
static int intel_idle_probe(void)
{
{
	unsigned int eax, ebx, ecx, edx;
	unsigned int eax, ebx, ecx;


	if (max_cstate == 0) {
	if (max_cstate == 0) {
		pr_debug(PREFIX "disabled\n");
		pr_debug(PREFIX "disabled\n");
@@ -275,17 +276,13 @@ static int intel_idle_probe(void)
	if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
	if (boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
		return -ENODEV;
		return -ENODEV;


	cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
	cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);


	if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
	if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
		!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
		!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
			return -ENODEV;
			return -ENODEV;
#ifdef DEBUG
	if (substates == 0)	/* can over-ride via modparam */
#endif
		substates = edx;


	pr_debug(PREFIX "MWAIT substates: 0x%x\n", substates);
	pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates);


	if (boot_cpu_has(X86_FEATURE_ARAT))	/* Always Reliable APIC Timer */
	if (boot_cpu_has(X86_FEATURE_ARAT))	/* Always Reliable APIC Timer */
		lapic_timer_reliable_states = 0xFFFFFFFF;
		lapic_timer_reliable_states = 0xFFFFFFFF;
@@ -376,7 +373,7 @@ static int intel_idle_cpuidle_devices_init(void)
			}
			}


			/* does the state exist in CPUID.MWAIT? */
			/* does the state exist in CPUID.MWAIT? */
			num_substates = (substates >> ((cstate) * 4))
			num_substates = (mwait_substates >> ((cstate) * 4))
						& MWAIT_SUBSTATE_MASK;
						& MWAIT_SUBSTATE_MASK;
			if (num_substates == 0)
			if (num_substates == 0)
				continue;
				continue;
@@ -452,9 +449,6 @@ module_exit(intel_idle_exit);


module_param(power_policy, int, 0644);
module_param(power_policy, int, 0644);
module_param(max_cstate, int, 0444);
module_param(max_cstate, int, 0444);
#ifdef DEBUG
module_param(substates, int, 0444);
#endif


MODULE_AUTHOR("Len Brown <len.brown@intel.com>");
MODULE_AUTHOR("Len Brown <len.brown@intel.com>");
MODULE_DESCRIPTION("Cpuidle driver for Intel Hardware v" INTEL_IDLE_VERSION);
MODULE_DESCRIPTION("Cpuidle driver for Intel Hardware v" INTEL_IDLE_VERSION);