Processor thermal interrupts for Lunar Lake
cover Processor thermal interrupts for Lunar Lake
Enable MSI interrupts for Lunar Lake. Also enable Workload hint and power floor support.
Srinivas Pandruvada (3):
thermal: intel: int340x: Remove unnecessary calls to free irq
thermal: intel: int340x: Support MSI interrupt for Lunar Lake
thermal: intel: int340x: Enable WLT and power floor support for Lunar
Lake
.../processor_thermal_device.h | 1 + .../processor_thermal_device_pci.c | 116 ++++++++++++++---- 2 files changed, 91 insertions(+), 26 deletions(-)
Signature · 1 line
2.40.1
PATCH 1/3 thermal: intel: int340x: Remove unnecessary calls to free irq
Remove calls to devm_free_irq() and pci_free_irq_vectors(). They will be called on driver release anyway.
--- .../intel/int340x_thermal/processor_thermal_device_pci.c | 3 --- 1 file changed, 3 deletions(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +0 -3
@@ -352,9 +352,6 @@ static void proc_thermal_pci_remove(struct pci_dev *pdev)proc_thermal_mmio_write (pci_info,PROC_THERMAL_MMIO_THRES_0 ,0 );proc_thermal_mmio_write (pci_info,PROC_THERMAL_MMIO_INT_ENABLE_0 ,0 ); -devm_free_irq (&pdev->dev, pdev->irq, pci_info); -pci_free_irq_vectors (pdev); -thermal_zone_device_unregister (pci_info->tzone);proc_thermal_mmio_remove (pdev, pci_info->proc_priv);if (!pci_info->no_legacy)
Signature · 1 line
2.40.1
PATCH 2/3 thermal: intel: int340x: Support MSI interrupt for Lunar Lake
In reply to Srinivas PandruvadaThe legacy PCI interrupt is no longer supported for processor thermal device on Lunar Lake. The support is via MSI.
Add feature PROC_THERMAL_FEATURE_MSI_SUPPORT to support MSI feature per generation. Define this feature for Lunar Lake processors.
There are 4 MSI sources:
0 - Package thermal
1 - DDR Thermal
2 - Power floor interrupt
3 - Workload type hint
On interrupt check the source and call the corresponding handler. Here don't need to call proc_thermal_check_wt_intr() and proc_thermal_check_power_floor_intr to check if the interrupt is for those sources as there is a dedicated MSI interrupt.
--- .../processor_thermal_device.h | 1 + .../processor_thermal_device_pci.c | 112 ++++++++++++++---- 2 files changed, 90 insertions(+), 23 deletions(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_device.h +1 -0
@@ -65,6 +65,7 @@ struct rapl_mmio_regs {#define PROC_THERMAL_FEATURE_DLVR 0x10#define PROC_THERMAL_FEATURE_WT_HINT 0x20#define PROC_THERMAL_FEATURE_POWER_FLOOR 0x40 +#define PROC_THERMAL_FEATURE_MSI_SUPPORT 0x80#if IS_ENABLED (CONFIG_PROC_THERMAL_MMIO_RAPL )int proc_thermal_rapl_add (struct pci_dev *pdev,struct proc_thermal_device *proc_priv);
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +89 -23
172 lines not on this page · raw message
Signature · 1 line
2.40.1
PATCH 3/3 thermal: intel: int340x: Enable WLT and power floor support for Lunar Lake
In reply to Srinivas PandruvadaAdd feature flgas for WLT and power floor for Lunar Lake.
--- .../intel/int340x_thermal/processor_thermal_device_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +2 -1
@@ -472,7 +472,8 @@ static const struct pci_device_id proc_thermal_pci_ids[] = { {PCI_DEVICE_DATA (INTEL ,ADL_THERMAL ,PROC_THERMAL_FEATURE_RAPL | PROC_THERMAL_FEATURE_FIVR | PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_WT_REQ) }, { PCI_DEVICE_DATA(INTEL, LNLM_THERMAL, PROC_THERMAL_FEATURE_MSI_SUPPORT | - PROC_THERMAL_FEATURE_RAPL | PROC_THERMAL_FEATURE_DLVR) }, +PROC_THERMAL_FEATURE_RAPL |PROC_THERMAL_FEATURE_DLVR | + PROC_THERMAL_FEATURE_WT_HINT | PROC_THERMAL_FEATURE_POWER_FLOOR) }, { PCI_DEVICE_DATA(INTEL, MTLP_THERMAL, PROC_THERMAL_FEATURE_RAPL |PROC_THERMAL_FEATURE_FIVR |PROC_THERMAL_FEATURE_DVFS |PROC_THERMAL_FEATURE_DLVR | PROC_THERMAL_FEATURE_WT_HINT | PROC_THERMAL_FEATURE_POWER_FLOOR) },
Signature · 1 line
2.40.1
Rafael J. Wysocki
maintainerQuoted 10 lines · Srinivas Pandruvada
Enable MSI interrupts for Lunar Lake. Also enable Workload hint and power floor support.
Srinivas Pandruvada (3):
thermal: intel: int340x: Remove unnecessary calls to free irq
thermal: intel: int340x: Support MSI interrupt for Lunar Lake
thermal: intel: int340x: Enable WLT and power floor support for Lunar
Lake
Quoted 5 lines
.../processor_thermal_device.h | 1 + .../processor_thermal_device_pci.c | 116 ++++++++++++++---- 2 files changed, 91 insertions(+), 26 deletions(-)--
All applied as 6.11 material, thanks!