mirror of
https://github.com/cyring/CoreFreq.git
synced 2025-07-23 04:12:59 +02:00
[Build][aarch64] Temperature compilation based on CONFIG_THERMAL
This commit is contained in:
@@ -48,7 +48,9 @@
|
|||||||
#ifdef CONFIG_ACPI_CPPC_LIB
|
#ifdef CONFIG_ACPI_CPPC_LIB
|
||||||
#include <acpi/cppc_acpi.h>
|
#include <acpi/cppc_acpi.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_THERMAL
|
||||||
#include <linux/thermal.h>
|
#include <linux/thermal.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_NMI
|
#ifdef CONFIG_HAVE_NMI
|
||||||
enum {
|
enum {
|
||||||
@@ -3255,6 +3257,7 @@ static void PerCore_Reset(CORE_RO *Core)
|
|||||||
|
|
||||||
static void PerCore_ThermalZone(CORE_RO *Core)
|
static void PerCore_ThermalZone(CORE_RO *Core)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_THERMAL
|
||||||
struct thermal_zone_device *tz = NULL;
|
struct thermal_zone_device *tz = NULL;
|
||||||
|
|
||||||
switch (Core->T.Cluster.Hybrid_ID) {
|
switch (Core->T.Cluster.Hybrid_ID) {
|
||||||
@@ -3270,6 +3273,7 @@ static void PerCore_ThermalZone(CORE_RO *Core)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
PRIVATE(OF(Core, AT(Core->Bind)))->ThermalZone = tz;
|
PRIVATE(OF(Core, AT(Core->Bind)))->ThermalZone = tz;
|
||||||
|
#endif /* CONFIG_THERMAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PerCore_GenericMachine(void *arg)
|
static void PerCore_GenericMachine(void *arg)
|
||||||
@@ -3993,6 +3997,7 @@ static COF_ST Compute_COF_From_PMU_Counter( unsigned long long deltaCounter,
|
|||||||
|
|
||||||
static void Core_Thermal_Temp(CORE_RO *Core)
|
static void Core_Thermal_Temp(CORE_RO *Core)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_THERMAL
|
||||||
if (!IS_ERR(PRIVATE(OF(Core, AT(Core->Bind)))->ThermalZone)) {
|
if (!IS_ERR(PRIVATE(OF(Core, AT(Core->Bind)))->ThermalZone)) {
|
||||||
int mcelsius;
|
int mcelsius;
|
||||||
if (thermal_zone_get_temp(PRIVATE(OF(Core, AT(Core->Bind)))->ThermalZone,
|
if (thermal_zone_get_temp(PRIVATE(OF(Core, AT(Core->Bind)))->ThermalZone,
|
||||||
@@ -4001,6 +4006,7 @@ static void Core_Thermal_Temp(CORE_RO *Core)
|
|||||||
Core->PowerThermal.Sensor = mcelsius;
|
Core->PowerThermal.Sensor = mcelsius;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_THERMAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum hrtimer_restart Cycle_GenericMachine(struct hrtimer *pTimer)
|
static enum hrtimer_restart Cycle_GenericMachine(struct hrtimer *pTimer)
|
||||||
|
@@ -424,7 +424,9 @@ typedef struct
|
|||||||
#ifdef CONFIG_CPU_FREQ
|
#ifdef CONFIG_CPU_FREQ
|
||||||
struct cpufreq_policy FreqPolicy;
|
struct cpufreq_policy FreqPolicy;
|
||||||
#endif /* CONFIG_CPU_FREQ */
|
#endif /* CONFIG_CPU_FREQ */
|
||||||
|
#ifdef CONFIG_THERMAL
|
||||||
struct thermal_zone_device *ThermalZone;
|
struct thermal_zone_device *ThermalZone;
|
||||||
|
#endif /* CONFIG_THERMAL */
|
||||||
#ifdef CONFIG_PM_OPP
|
#ifdef CONFIG_PM_OPP
|
||||||
struct {
|
struct {
|
||||||
signed int VID;
|
signed int VID;
|
||||||
|
Reference in New Issue
Block a user