|
18 | 18 | #include <linux/thermal.h> |
19 | 19 | #include <linux/reboot.h> |
20 | 20 | #include <linux/string.h> |
21 | | -#include <linux/cpufreq.h> |
22 | 21 | #include <linux/of.h> |
23 | 22 | #include <linux/suspend.h> |
24 | 23 |
|
25 | | -#include <asm/stacktrace.h> |
26 | 24 | #define CREATE_TRACE_POINTS |
27 | 25 | #include "thermal_trace.h" |
28 | 26 |
|
@@ -343,49 +341,6 @@ static void handle_critical_trips(struct thermal_zone_device *tz, |
343 | 341 | tz->ops->critical(tz); |
344 | 342 | } |
345 | 343 |
|
346 | | -static int thermal_boost_enable(struct thermal_zone_device *tz) |
347 | | -{ |
348 | | - enum thermal_trend trend = get_tz_trend(tz, 0); |
349 | | - struct thermal_trip trip; |
350 | | - |
351 | | - if (!tz->overheated) |
352 | | - return -EPERM; |
353 | | - if (trend == THERMAL_TREND_RAISING) |
354 | | - return -EBUSY; |
355 | | - |
356 | | - __thermal_zone_get_trip(tz, 0, &trip); |
357 | | - |
358 | | - if ((tz->temperature + (trip.temperature >> 2)) < trip.temperature) { |
359 | | - mutex_lock(&tz->lock); |
360 | | - tz->overheated = false; |
361 | | - if (tz->boost_polling) { |
362 | | - tz->boost_polling = false; |
363 | | - thermal_zone_device_set_polling(tz, 0); |
364 | | - } |
365 | | - mutex_unlock(&tz->lock); |
366 | | - cpufreq_boost_trigger_state(1); |
367 | | - return 0; |
368 | | - } |
369 | | - return -EBUSY; |
370 | | -} |
371 | | - |
372 | | -static void thermal_boost_disable(struct thermal_zone_device *tz) |
373 | | -{ |
374 | | - cpufreq_boost_trigger_state(0); |
375 | | - |
376 | | - /* |
377 | | - * If no workqueue for monitoring is running - start one with |
378 | | - * 1000 ms monitoring period |
379 | | - * If workqueue already running - do not change its period and only |
380 | | - * test if target CPU has cooled down |
381 | | - */ |
382 | | - if (tz->mode != THERMAL_DEVICE_ENABLED) { |
383 | | - tz->boost_polling = true; |
384 | | - thermal_zone_device_set_polling(tz, 1000); |
385 | | - } |
386 | | - tz->overheated = true; |
387 | | -} |
388 | | - |
389 | 344 | static void handle_thermal_trip(struct thermal_zone_device *tz, int trip_id) |
390 | 345 | { |
391 | 346 | struct thermal_trip trip; |
@@ -465,11 +420,6 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz, |
465 | 420 |
|
466 | 421 | update_temperature(tz); |
467 | 422 |
|
468 | | - if (cpufreq_boost_supported() && cpufreq_boost_enabled()) |
469 | | - if ((tz->temperature + (tz->trips[0].temperature >> 2)) |
470 | | - >= tz->trips[0].temperature) |
471 | | - thermal_boost_disable(tz); |
472 | | - |
473 | 423 | __thermal_zone_set_trips(tz); |
474 | 424 |
|
475 | 425 | tz->notify_event = event; |
@@ -576,9 +526,6 @@ static void thermal_zone_device_check(struct work_struct *work) |
576 | 526 | struct thermal_zone_device *tz = container_of(work, struct |
577 | 527 | thermal_zone_device, |
578 | 528 | poll_queue.work); |
579 | | - if (cpufreq_boost_supported()) |
580 | | - if (!thermal_boost_enable(tz)) |
581 | | - return; |
582 | 529 | thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); |
583 | 530 | } |
584 | 531 |
|
|
0 commit comments