Commit cd073e47 authored by Ricardo Neri's avatar Ricardo Neri Committed by Jun Tian
Browse files

thermal: intel: hfi: Minimally initialize the Hardware Feedback Interface

mainline inclusion
from mainline-5.18
commit 1cb19cab
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5DSOL



Intel_SIG: commit 1cb19cab thermal: intel: hfi: Minimally initialize
the Hardware Feedback Interface.
Backport for Intel HFI (Hardware Feedback Interface) support

-------------------------------------

The Intel Hardware Feedback Interface provides guidance to the operating
system about the performance and energy efficiency capabilities of each
CPU in the system. Capabilities are numbers between 0 and 255 where a
higher number represents a higher capability. For each CPU, energy
efficiency and performance are reported as separate capabilities.

Hardware computes these capabilities based on the operating conditions of
the system such as power and thermal limits. These capabilities are shared
with the operating system in a table resident in memory. Each package in
the system has its own HFI instance. Every logical CPU in the package is
represented in the table. More than one logical CPUs may be represented in
a single table entry. When the hardware updates the table, it generates a
package-level thermal interrupt.

The size and format of the HFI table depend on the supported features and
can only be determined at runtime. To minimally initialize the HFI, parse
its features and allocate one instance per package of a data structure with
the necessary parameters to read and navigate a local copy (i.e., owned by
the driver) of individual HFI tables.

A subsequent changeset will provide per-CPU initialization and interrupt
handling.

Reviewed-by: default avatarLen Brown <len.brown@intel.com>
Co-developed by: Aubrey Li <aubrey.li@linux.intel.com>
Signed-off-by: default avatarAubrey Li <aubrey.li@linux.intel.com>
Signed-off-by: default avatarRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avataryingbao jia <yingbao.jia@intel.com>
Signed-off-by: default avatarJun Tian <jun.j.tian@intel.com>
parent 967320d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment