History log of /linux-master/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.h
Revision Date Author Comments
# ea197ea2 24-May-2023 Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

thermal: intel: int340x_thermal: New IOCTLs for Passive v2 table

Export Passive version 2 table similar to the way _TRT and _ART tables
via IOCTLs.

This removes need for binary utility to read ACPI Passive 2 table by
providing open source support. This table already has open source
implementation in the user space thermald, when the table is part of
data vault exported by the int3400 sysfs.

This table is supported in some older platforms before Ice Lake
generation.

Passive 2 tables contain multiple entries. Each entry has following
fields:

* Source: Named Reference (String). This is the source device for
temperature.
* Target: Named Reference (String). This is the target device to
control.
* Priority: Priority of this device compared to others.
* SamplingPeriod: Time Period in 1/10 of seconds unit.
* PassiveTemp: Passive Temperature in 1/10 of Kelvin.
* SourceDomain: Domain for the source (00:Processor, others reserved).
* ControlKnob: Type of control knob (00:Power Limit 1, others: reserved)
* Limit: The target state to set on reaching passive temperature.
This can be a string "max", "min" or a power limit value.
* LimitStepSize: Step size during activation.
* UnLimitStepSize: Step size during deactivation.
* Reserved1: Reserved

Three IOCTLs are added similar to IOCTLs for reading TRT:

ACPI_THERMAL_GET_PSVT_COUNT: Number of passive 2 entries.
ACPI_THERMAL_GET_PSVT_LEN: Total return data size (count x each
passive 2 entry size).
ACPI_THERMAL_GET_PSVT: Get the data as an array of objects with
passive 2 entries.

This change is based on original development done by:
Todd Brandt <todd.e.brandt@linux.intel.com>

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Changelog and subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 764cedc5 18-Nov-2021 Kees Cook <keescook@chromium.org>

thermal: int340x: Use struct_group() for memcpy() region

In preparation for FORTIFY_SOURCE performing compile-time and
run-time field bounds checking for memcpy(), avoid intentionally
writing across neighboring fields.

Use struct_group() in struct art around members weight, and
ac[0-9]_max, so they can be referenced together. This will allow
memcpy() and sizeof() to more easily reason about sizes, improve
readability, and avoid future warnings about writing beyond the
end of weight.

"pahole" shows no size nor member offset changes to struct art.
"objdump -d" shows no meaningful object code changes (i.e. only
source line number induced differences).

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 3e8c4d31 06-Dec-2018 Amit Kucheria <amit.kucheria@linaro.org>

drivers: thermal: Move various drivers for intel platforms into a subdir

This cleans up the directory a bit, now that we have several other
platforms using platform-specific sub-directories. Compile-tested with
ARCH=x86 defconfig and the drivers explicitly enabled with menuconfig.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>