lkml.org 
[lkml]   [2021]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/7] thermal: intel: hfi: Minimally initialize the Hardware Feedback Interface
On Mon, Dec 20, 2021 at 4:23 PM Ricardo Neri
<ricardo.neri-calderon@linux.intel.com> wrote:
>
> 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.
>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Aubrey Li <aubrey.li@linux.intel.com>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Tim Chen <tim.c.chen@linux.intel.com>
> Cc: "Ravi V. Shankar" <ravi.v.shankar@intel.com>
> Reviewed-by: Len Brown <len.brown@intel.com>
> Co-developed by: Aubrey Li <aubrey.li@linux.intel.com>
> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
> ---
> Changes since v1:
> * Renamed X86_FEATURE_INTEL_HFI as X86_FEATURE_HFI. (Boris)
> * Reworked parsing of HFI features using bitfields instead of bitmasks.
> (PeterZ).
> * Removed hfi_instance::parsed as hfi_parse_features() is called only
> once via intel_hfi_init() via thermal_throttle_init_device().
> (Rafael)
> * Converted pr_err() to pr_debug(). (Srinivas, Rafael)
> * Removed unnecessary dependency on CONFIG_SCHED_MC.
> * Renamed hfi_instance::ts_counter as hfi_instance::timestamp.
> * Renamed hfi_instance::table_base as hfi_instance::local_table and
> relocated its definition to this patch.
> * Wrapped hfi_instance::timestamp and hfi_instance:local_table in an
> anonymous union, since both point at the same location.
> ---
> drivers/thermal/intel/Kconfig | 12 ++
> drivers/thermal/intel/Makefile | 1 +
> drivers/thermal/intel/intel_hfi.c | 175 ++++++++++++++++++++++++++++
> drivers/thermal/intel/intel_hfi.h | 11 ++
> drivers/thermal/intel/therm_throt.c | 3 +
> 5 files changed, 202 insertions(+)
> create mode 100644 drivers/thermal/intel/intel_hfi.c
> create mode 100644 drivers/thermal/intel/intel_hfi.h
>
> diff --git a/drivers/thermal/intel/Kconfig b/drivers/thermal/intel/Kconfig
> index c83ea5d04a1d..1a21ff60fdc7 100644
> --- a/drivers/thermal/intel/Kconfig
> +++ b/drivers/thermal/intel/Kconfig
> @@ -99,3 +99,15 @@ config INTEL_MENLOW
> Intel Menlow platform.
>
> If unsure, say N.
> +
> +config INTEL_HFI

This looks like it may be too general, because HFI is not a thermal-only thing.

Maybe cal it INTEL_HFI_THERMAL?

\
 
 \ /
  Last update: 2021-12-30 19:43    [W:0.095 / U:1.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site