mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] thermal: intel: Add support for Directed Package Thermal Interrupts
@ 2026-03-09 22:19 Ricardo Neri
  2026-03-09 22:19 ` [PATCH 1/4] x86/thermal: Add bit definitions for Intel Directed Package Thermal Interrupt Ricardo Neri
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ricardo Neri @ 2026-03-09 22:19 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Lukasz Luba
  Cc: x86, Srinivas Pandruvada, Zhang Rui, linux-kernel, linux-pm,
	Ricardo Neri, Ricardo Neri

Hi,

Package-level thermal interrupts are currently broadcast to all CPUs in a
package. Only one CPU is needed to service package-wide events. Moreover,
broadcasting may create resource contention. An example of this are thermal
interrupts posted for Hardware Feedback Interface[1] updates: all CPUs in
the package receive the interrupt and then race to grab a lock to update a
data structure common to all CPUs. Idle CPUs were needlessly woken up.

Newer Intel processors allow directing package-level thermal interrupts
only to CPUs that explicitly request them. A CPU opts in by setting bit 25
in IA32_THERM_INTERRUPT. Hardware acknowledges the request by setting bit 25
in IA32_PACKAGE_THERM_STATUS.

This series enables directed package thermal interrupts and designates one
handler CPU per package using the CPU hotplug infrastructure. A new CPU is
selected if the handler CPU goes offline.

Because CPU0's hotplug callbacks are not invoked during suspend and resume,
syscore callbacks are added to restore the handler for the boot package.
The series also disables directed delivery during kexec reboot, avoiding
stale interrupt routing when rebooting into a kernel that does not support
the feature.

[1]. Intel Software Developer's Manual Vol. 3, Section 17.6, Feb 2026

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
---
Ricardo Neri (4):
      x86/thermal: Add bit definitions for Intel Directed Package Thermal Interrupt
      thermal: intel: Enable Directed Package-level Thermal Interrupts
      thermal: intel: Add syscore callbacks for suspend and resume
      thermal: intel: Add a syscore shutdown callback for kexec reboot

 arch/x86/include/asm/cpufeatures.h  |   1 +
 arch/x86/include/asm/msr-index.h    |   2 +
 drivers/thermal/intel/therm_throt.c | 223 +++++++++++++++++++++++++++++++++++-
 3 files changed, 225 insertions(+), 1 deletion(-)
---
base-commit: 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
change-id: 20260306-rneri-directed-therm-intr-9f3f8888bb3f

Best regards,
-- 
Ricardo Neri <ricardo.neri-calderon@linux.intel.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-10 22:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-09 22:19 [PATCH 0/4] thermal: intel: Add support for Directed Package Thermal Interrupts Ricardo Neri
2026-03-09 22:19 ` [PATCH 1/4] x86/thermal: Add bit definitions for Intel Directed Package Thermal Interrupt Ricardo Neri
2026-03-10  9:35   ` Borislav Petkov
2026-03-10 22:21     ` Ricardo Neri
2026-03-09 22:19 ` [PATCH 2/4] thermal: intel: Enable Directed Package-level Thermal Interrupts Ricardo Neri
2026-03-09 22:19 ` [PATCH 3/4] thermal: intel: Add syscore callbacks for suspend and resume Ricardo Neri
2026-03-09 22:19 ` [PATCH 4/4] thermal: intel: Add a syscore shutdown callback for kexec reboot Ricardo Neri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®