Commit 73abe700 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge back thermal control changes related to Intel platforms for v6.11

parents 096597cf 68de0ae4
...@@ -571,7 +571,7 @@ static int int3400_thermal_probe(struct platform_device *pdev) ...@@ -571,7 +571,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
if (!adev) if (!adev)
return -ENODEV; return -ENODEV;
priv = kzalloc(sizeof(struct int3400_thermal_priv), GFP_KERNEL); priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
......
...@@ -25,17 +25,6 @@ struct int3403_sensor { ...@@ -25,17 +25,6 @@ struct int3403_sensor {
struct int34x_thermal_zone *int340x_zone; struct int34x_thermal_zone *int340x_zone;
}; };
struct int3403_performance_state {
u64 performance;
u64 power;
u64 latency;
u64 linear;
u64 control;
u64 raw_performace;
char *raw_unit;
int reserved;
};
struct int3403_cdev { struct int3403_cdev {
struct thermal_cooling_device *cdev; struct thermal_cooling_device *cdev;
unsigned long max_state; unsigned long max_state;
......
...@@ -298,6 +298,11 @@ static int intel_pch_thermal_suspend_noirq(struct device *device) ...@@ -298,6 +298,11 @@ static int intel_pch_thermal_suspend_noirq(struct device *device)
/* Get the PCH current temperature value */ /* Get the PCH current temperature value */
pch_cur_temp = GET_PCH_TEMP(WPT_TEMP_TSR & readw(ptd->hw_base + WPT_TEMP)); pch_cur_temp = GET_PCH_TEMP(WPT_TEMP_TSR & readw(ptd->hw_base + WPT_TEMP));
if (pch_cur_temp >= pch_thr_temp)
dev_warn(&ptd->pdev->dev,
"CPU-PCH current temp [%dC] higher than the threshold temp [%dC], S0ix might fail. Start cooling...\n",
pch_cur_temp, pch_thr_temp);
/* /*
* If current PCH temperature is higher than configured PCH threshold * If current PCH temperature is higher than configured PCH threshold
* value, run some delay loop with sleep to let the current temperature * value, run some delay loop with sleep to let the current temperature
......
...@@ -36,7 +36,7 @@ static irqreturn_t soc_irq_thread_fn(int irq, void *dev_data) ...@@ -36,7 +36,7 @@ static irqreturn_t soc_irq_thread_fn(int irq, void *dev_data)
} }
static const struct x86_cpu_id soc_thermal_ids[] = { static const struct x86_cpu_id soc_thermal_ids[] = {
X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT, BYT_SOC_DTS_APIC_IRQ), X86_MATCH_VFM(INTEL_ATOM_SILVERMONT, BYT_SOC_DTS_APIC_IRQ),
{} {}
}; };
MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids); MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids);
......
...@@ -49,21 +49,21 @@ static const struct thermal_cooling_device_ops tcc_cooling_ops = { ...@@ -49,21 +49,21 @@ static const struct thermal_cooling_device_ops tcc_cooling_ops = {
}; };
static const struct x86_cpu_id tcc_ids[] __initconst = { static const struct x86_cpu_id tcc_ids[] __initconst = {
X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE, NULL), X86_MATCH_VFM(INTEL_SKYLAKE, NULL),
X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE_L, NULL), X86_MATCH_VFM(INTEL_SKYLAKE_L, NULL),
X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE, NULL), X86_MATCH_VFM(INTEL_KABYLAKE, NULL),
X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE_L, NULL), X86_MATCH_VFM(INTEL_KABYLAKE_L, NULL),
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE, NULL), X86_MATCH_VFM(INTEL_ICELAKE, NULL),
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L, NULL), X86_MATCH_VFM(INTEL_ICELAKE_L, NULL),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, NULL), X86_MATCH_VFM(INTEL_TIGERLAKE, NULL),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, NULL), X86_MATCH_VFM(INTEL_TIGERLAKE_L, NULL),
X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE, NULL), X86_MATCH_VFM(INTEL_COMETLAKE, NULL),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, NULL), X86_MATCH_VFM(INTEL_ALDERLAKE, NULL),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, NULL), X86_MATCH_VFM(INTEL_ALDERLAKE_L, NULL),
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GRACEMONT, NULL), X86_MATCH_VFM(INTEL_ATOM_GRACEMONT, NULL),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, NULL), X86_MATCH_VFM(INTEL_RAPTORLAKE, NULL),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, NULL), X86_MATCH_VFM(INTEL_RAPTORLAKE_P, NULL),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, NULL), X86_MATCH_VFM(INTEL_RAPTORLAKE_S, NULL),
{} {}
}; };
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
static inline bool soc_intel_is_##soc(void) \ static inline bool soc_intel_is_##soc(void) \
{ \ { \
static const struct x86_cpu_id soc##_cpu_ids[] = { \ static const struct x86_cpu_id soc##_cpu_ids[] = { \
X86_MATCH_INTEL_FAM6_MODEL(type, NULL), \ X86_MATCH_VFM(type, NULL), \
{} \ {} \
}; \ }; \
const struct x86_cpu_id *id; \ const struct x86_cpu_id *id; \
...@@ -31,11 +31,11 @@ static inline bool soc_intel_is_##soc(void) \ ...@@ -31,11 +31,11 @@ static inline bool soc_intel_is_##soc(void) \
return false; \ return false; \
} }
SOC_INTEL_IS_CPU(byt, ATOM_SILVERMONT); SOC_INTEL_IS_CPU(byt, INTEL_ATOM_SILVERMONT);
SOC_INTEL_IS_CPU(cht, ATOM_AIRMONT); SOC_INTEL_IS_CPU(cht, INTEL_ATOM_AIRMONT);
SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT); SOC_INTEL_IS_CPU(apl, INTEL_ATOM_GOLDMONT);
SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS); SOC_INTEL_IS_CPU(glk, INTEL_ATOM_GOLDMONT_PLUS);
SOC_INTEL_IS_CPU(cml, KABYLAKE_L); SOC_INTEL_IS_CPU(cml, INTEL_KABYLAKE_L);
#undef SOC_INTEL_IS_CPU #undef SOC_INTEL_IS_CPU
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment