Skip to content

Commit

Permalink
Merge branch 'thermal-intel'
Browse files Browse the repository at this point in the history
Merge updates of Intel thermal drivers for v6.10:

 - Add missing MODULE_DESCRIPTION() to multiple files in the
   int340x_thermal and intel_soc_dts_iosf drivers (Srinivas Pandruvada).

 - Adjust the update delay and capabilities-per-event values in the
   Intel HFI thermal driver to prevent it from missing events and allow
   it to process more data in one go (Ricardo Neri).

* thermal-intel:
  thermal: intel: hfi: Increase the number of CPU capabilities per netlink event
  thermal: intel: hfi: Rename HFI_MAX_THERM_NOTIFY_COUNT
  thermal: intel: hfi: Shorten the thermal netlink event delay to 100ms
  thermal: intel: hfi: Rename HFI_UPDATE_INTERVAL
  thermal: intel: Add missing module description
  • Loading branch information
Rafael J. Wysocki committed May 10, 2024
2 parents 9396b2a + 608fa85 commit 3a47fbd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,4 @@ int processor_thermal_mbox_interrupt_config(struct pci_dev *pdev, bool enable,
EXPORT_SYMBOL_NS_GPL(processor_thermal_mbox_interrupt_config, INT340X_THERMAL);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Processor Thermal Mail Box Interface");
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,4 @@ EXPORT_SYMBOL_NS_GPL(proc_thermal_power_floor_intr_callback, INT340X_THERMAL);

MODULE_IMPORT_NS(INT340X_THERMAL);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Processor Thermal power floor notification Interface");
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ void proc_thermal_rapl_remove(void)
EXPORT_SYMBOL_GPL(proc_thermal_rapl_remove);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("RAPL interface using MMIO");
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,4 @@ void proc_thermal_rfim_remove(struct pci_dev *pdev)
EXPORT_SYMBOL_GPL(proc_thermal_rfim_remove);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Processor Thermal RFIM Interface");
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,4 @@ EXPORT_SYMBOL_NS_GPL(proc_thermal_wt_hint_remove, INT340X_THERMAL);

MODULE_IMPORT_NS(INT340X_THERMAL);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Processor Thermal Work Load type hint Interface");
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,4 @@ EXPORT_SYMBOL_GPL(proc_thermal_wt_req_remove);

MODULE_IMPORT_NS(INT340X_THERMAL);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Processor Thermal Work Load type request Interface");
16 changes: 8 additions & 8 deletions drivers/thermal/intel/intel_hfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ static struct hfi_features hfi_features;
static DEFINE_MUTEX(hfi_instance_lock);

static struct workqueue_struct *hfi_updates_wq;
#define HFI_UPDATE_INTERVAL HZ
#define HFI_MAX_THERM_NOTIFY_COUNT 16
#define HFI_UPDATE_DELAY_MS 100
#define HFI_THERMNL_CAPS_PER_EVENT 64

static void get_hfi_caps(struct hfi_instance *hfi_instance,
struct thermal_genl_cpu_caps *cpu_caps)
Expand Down Expand Up @@ -218,14 +218,14 @@ static void update_capabilities(struct hfi_instance *hfi_instance)

get_hfi_caps(hfi_instance, cpu_caps);

if (cpu_count < HFI_MAX_THERM_NOTIFY_COUNT)
if (cpu_count < HFI_THERMNL_CAPS_PER_EVENT)
goto last_cmd;

/* Process complete chunks of HFI_MAX_THERM_NOTIFY_COUNT capabilities. */
/* Process complete chunks of HFI_THERMNL_CAPS_PER_EVENT capabilities. */
for (i = 0;
(i + HFI_MAX_THERM_NOTIFY_COUNT) <= cpu_count;
i += HFI_MAX_THERM_NOTIFY_COUNT)
thermal_genl_cpu_capability_event(HFI_MAX_THERM_NOTIFY_COUNT,
(i + HFI_THERMNL_CAPS_PER_EVENT) <= cpu_count;
i += HFI_THERMNL_CAPS_PER_EVENT)
thermal_genl_cpu_capability_event(HFI_THERMNL_CAPS_PER_EVENT,
&cpu_caps[i]);

cpu_count = cpu_count - i;
Expand Down Expand Up @@ -322,7 +322,7 @@ void intel_hfi_process_event(__u64 pkg_therm_status_msr_val)
raw_spin_unlock(&hfi_instance->event_lock);

queue_delayed_work(hfi_updates_wq, &hfi_instance->update_work,
HFI_UPDATE_INTERVAL);
msecs_to_jiffies(HFI_UPDATE_DELAY_MS));
}

static void init_hfi_cpu_index(struct hfi_cpu_info *info)
Expand Down
1 change: 1 addition & 0 deletions drivers/thermal/intel/intel_soc_dts_iosf.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,4 @@ EXPORT_SYMBOL_GPL(intel_soc_dts_iosf_exit);

MODULE_IMPORT_NS(INTEL_TCC);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("SoC DTS driver using side band interface");

0 comments on commit 3a47fbd

Please sign in to comment.