Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'thermal-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
"These fix two power allocator thermal governor issues and an ACPI
thermal driver regression that all were introduced during the 6.8
development cycle.

Specifics:

- Allow the power allocator thermal governor to bind to a thermal
zone without cooling devices and/or without trip points (Nikita
Travkin)

- Make the ACPI thermal driver register a tripless thermal zone when
it cannot find any usable trip points instead of returning an error
from acpi_thermal_add() (Stephen Horvath)"

* tag 'thermal-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
thermal: gov_power_allocator: Allow binding without trip points
thermal: gov_power_allocator: Allow binding without cooling devices
ACPI: thermal: Register thermal zones without valid trip points

+15 -21
+10 -12
drivers/acpi/thermal.c
··· 662 662 { 663 663 int result; 664 664 665 - tz->thermal_zone = thermal_zone_device_register_with_trips("acpitz", 666 - trip_table, 667 - trip_count, 668 - tz, 669 - &acpi_thermal_zone_ops, 670 - NULL, 671 - passive_delay, 672 - tz->polling_frequency * 100); 665 + if (trip_count) 666 + tz->thermal_zone = thermal_zone_device_register_with_trips( 667 + "acpitz", trip_table, trip_count, tz, 668 + &acpi_thermal_zone_ops, NULL, passive_delay, 669 + tz->polling_frequency * 100); 670 + else 671 + tz->thermal_zone = thermal_tripless_zone_device_register( 672 + "acpitz", tz, &acpi_thermal_zone_ops, NULL); 673 + 673 674 if (IS_ERR(tz->thermal_zone)) 674 675 return PTR_ERR(tz->thermal_zone); 675 676 ··· 902 901 trip++; 903 902 } 904 903 905 - if (trip == trip_table) { 904 + if (trip == trip_table) 906 905 pr_warn(FW_BUG "No valid trip points!\n"); 907 - result = -ENODEV; 908 - goto free_memory; 909 - } 910 906 911 907 result = acpi_thermal_register_thermal_zone(tz, trip_table, 912 908 trip - trip_table,
+5 -9
drivers/thermal/gov_power_allocator.c
··· 606 606 607 607 /* There might be no cooling devices yet. */ 608 608 if (!num_actors) { 609 - ret = -EINVAL; 609 + ret = 0; 610 610 goto clean_state; 611 611 } 612 612 ··· 679 679 return -ENOMEM; 680 680 681 681 get_governor_trips(tz, params); 682 - if (!params->trip_max) { 683 - dev_warn(&tz->device, "power_allocator: missing trip_max\n"); 684 - kfree(params); 685 - return -EINVAL; 686 - } 687 682 688 683 ret = check_power_actors(tz, params); 689 684 if (ret < 0) { ··· 709 714 else 710 715 params->sustainable_power = tz->tzp->sustainable_power; 711 716 712 - estimate_pid_constants(tz, tz->tzp->sustainable_power, 713 - params->trip_switch_on, 714 - params->trip_max->temperature); 717 + if (params->trip_max) 718 + estimate_pid_constants(tz, tz->tzp->sustainable_power, 719 + params->trip_switch_on, 720 + params->trip_max->temperature); 715 721 716 722 reset_pid_controller(params); 717 723