projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
thermal
/
thermal_core.c
diff --git
a/drivers/thermal/thermal_core.c
b/drivers/thermal/thermal_core.c
index 1e23f4f8d2c2099cc2f634010e4ff8ff2c2db11c..43b90709585ff294713e299cca1b6cdac406c098 100644
(file)
--- a/
drivers/thermal/thermal_core.c
+++ b/
drivers/thermal/thermal_core.c
@@
-38,6
+38,9
@@
#include <net/netlink.h>
#include <net/genetlink.h>
#include <net/netlink.h>
#include <net/genetlink.h>
+#define CREATE_TRACE_POINTS
+#include <trace/events/thermal.h>
+
#include "thermal_core.h"
#include "thermal_hwmon.h"
#include "thermal_core.h"
#include "thermal_hwmon.h"
@@
-368,6
+371,8
@@
static void handle_critical_trips(struct thermal_zone_device *tz,
if (tz->temperature < trip_temp)
return;
if (tz->temperature < trip_temp)
return;
+ trace_thermal_zone_trip(tz, trip, trip_type);
+
if (tz->ops->notify)
tz->ops->notify(tz, trip, trip_type);
if (tz->ops->notify)
tz->ops->notify(tz, trip, trip_type);
@@
-463,6
+468,7
@@
static void update_temperature(struct thermal_zone_device *tz)
tz->temperature = temp;
mutex_unlock(&tz->lock);
tz->temperature = temp;
mutex_unlock(&tz->lock);
+ trace_thermal_temperature(tz);
dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n",
tz->last_temperature, tz->temperature);
}
dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n",
tz->last_temperature, tz->temperature);
}
@@
-1287,6
+1293,7
@@
void thermal_cdev_update(struct thermal_cooling_device *cdev)
mutex_unlock(&cdev->lock);
cdev->ops->set_cur_state(cdev, target);
cdev->updated = true;
mutex_unlock(&cdev->lock);
cdev->ops->set_cur_state(cdev, target);
cdev->updated = true;
+ trace_cdev_update(cdev, target);
dev_dbg(&cdev->device, "set to state %lu\n", target);
}
EXPORT_SYMBOL(thermal_cdev_update);
dev_dbg(&cdev->device, "set to state %lu\n", target);
}
EXPORT_SYMBOL(thermal_cdev_update);
@@
-1568,8
+1575,7
@@
struct thermal_zone_device *thermal_zone_device_register(const char *type,
thermal_zone_device_update(tz);
thermal_zone_device_update(tz);
- if (!result)
- return tz;
+ return tz;
unregister:
release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);
unregister:
release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);
@@
-1790,6
+1796,10
@@
static int __init thermal_register_governors(void)
if (result)
return result;
if (result)
return result;
+ result = thermal_gov_bang_bang_register();
+ if (result)
+ return result;
+
return thermal_gov_user_space_register();
}
return thermal_gov_user_space_register();
}
@@
-1797,6
+1807,7
@@
static void thermal_unregister_governors(void)
{
thermal_gov_step_wise_unregister();
thermal_gov_fair_share_unregister();
{
thermal_gov_step_wise_unregister();
thermal_gov_fair_share_unregister();
+ thermal_gov_bang_bang_unregister();
thermal_gov_user_space_unregister();
}
thermal_gov_user_space_unregister();
}