Unverified Commit bd7ac404 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!839 intel: backport intel-pstate patches for Server platforms

Merge Pull Request from: @jiayingbao 
 
backport some patches for Intel_pstate no-HWP and OOB mode, and also one HWP update for all server platforms
including below commit:

cd23f02f cpufreq: intel_pstate: Add Ice Lake server to out-of-band IDs
addca285 cpufreq: intel_pstate: Handle no_turbo in frequency invariance.
bbd67f1b cpufreq: intel_pstate: Support Sapphire Rapids OOB mode.
df51f287 cpufreq: intel_pstate: Add Sapphire Rapids support in no-HWP mode.
1f5e62f5 cpufreq: intel_pstate: Enable HWP IO boost for all servers.

test:
build pass
intel_pstate initial and functional as expected
 
 
Link:https://gitee.com/openeuler/kernel/pulls/839

 

Reviewed-by: default avatarJason Zeng <jason.zeng@intel.com>
Reviewed-by: default avatarAichun Shi <aichun.shi@intel.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 93bf728a e91ec3b9
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -1197,6 +1197,7 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
	mutex_unlock(&intel_pstate_limits_lock);

	intel_pstate_update_policies();
	arch_set_max_freq_ratio(global.no_turbo);

	mutex_unlock(&intel_pstate_driver_lock);

@@ -2101,6 +2102,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
	X86_MATCH(ATOM_GOLDMONT_PLUS,	core_funcs),
	X86_MATCH(SKYLAKE_X,		core_funcs),
	X86_MATCH(ICELAKE_X,		core_funcs),
	X86_MATCH(SAPPHIRERAPIDS_X,	core_funcs),
	{}
};
MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
@@ -2109,6 +2111,8 @@ static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = {
	X86_MATCH(BROADWELL_D,		core_funcs),
	X86_MATCH(BROADWELL_X,		core_funcs),
	X86_MATCH(SKYLAKE_X,		core_funcs),
	X86_MATCH(ICELAKE_X,		core_funcs),
	X86_MATCH(SAPPHIRERAPIDS_X,	core_funcs),
	{}
};

@@ -2117,12 +2121,6 @@ static const struct x86_cpu_id intel_pstate_cpu_ee_disable_ids[] = {
	{}
};

static const struct x86_cpu_id intel_pstate_hwp_boost_ids[] = {
	X86_MATCH(SKYLAKE_X,		core_funcs),
	X86_MATCH(SKYLAKE,		core_funcs),
	{}
};

static int intel_pstate_init_cpu(unsigned int cpunum)
{
	struct cpudata *cpu;
@@ -2141,12 +2139,9 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
		cpu->epp_default = -EINVAL;

		if (hwp_active) {
			const struct x86_cpu_id *id;

			intel_pstate_hwp_enable(cpu);

			id = x86_match_cpu(intel_pstate_hwp_boost_ids);
			if (id && intel_pstate_acpi_pm_profile_server())
			if (intel_pstate_acpi_pm_profile_server())
				hwp_boost = true;
		}
	} else if (hwp_active) {