diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index 14d851ae..d72dd8ad 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -104,6 +104,8 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_attribute_struct_has_const_struct_cl NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_create_has_no_owner_arg NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_struct_devnode_has_const_dev_arg NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_arg +NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_dev_profile_has_is_cooling_device +NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_has_freq_table NV_CONFTEST_FUNCTION_COMPILE_TESTS += device_add_disk_has_int_return_type NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_tegra_core_dev_init_opp_table_common NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_thermal_of_zone_register @@ -173,6 +175,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra264_chip_id NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_dev_iommu_get_stream_id NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_ivc_struct_has_iosys_map NV_CONFTEST_FUNCTION_COMPILE_TESTS += thermal_zone_device_priv +NV_CONFTEST_FUNCTION_COMPILE_TESTS += thermal_zone_for_each_trip NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_send_xchar_has_u8_arg NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_write_has_u8_ptr_arg NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_set_termios_has_const_ktermios_arg diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 2622a887..c1feedc3 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -6763,6 +6763,39 @@ compile_test() { compile_check_conftest "$CODE" "NV_DEFINE_SEMAPHORE_HAS_NUMBER_ARG" "" "types" ;; + devfreq_dev_profile_has_is_cooling_device) + # + # Determine if the 'devfreq_dev_profile' structure has 'is_cooling_device'. + # + # Commit 1224451bb6f93 ("PM / devfreq: Register devfreq as a cooling device + # on demand") updated the devfreq_dev_profile and add the is_cooling_device + # field in v5.12. + # + CODE=" + #include + bool conftest_devfreq_dev_profile_has_is_cooling_device(struct devfreq_dev_profile *profile) { + return profile->is_cooling_device; + }" + + compile_check_conftest "$CODE" "NV_DEVFREQ_DEV_PROFILE_HAS_IS_COOLING_DEVICE" "" "types" + ;; + + devfreq_has_freq_table) + # + # Determine if the 'devfreq' structure has 'freq_table'. + # + # Commit b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq + # struct") updated the devfreq and add the freq_table field in v5.19. + # + CODE=" + #include + unsigned long *conftest_devfreq_has_freq_table(struct devfreq *devfreq) { + return devfreq->freq_table; + }" + + compile_check_conftest "$CODE" "NV_DEVFREQ_HAS_FREQ_TABLE" "" "types" + ;; + device_add_disk_has_int_return_type) # # Determine if the function device_add_disk() returns an integer. @@ -7917,6 +7950,23 @@ compile_test() { compile_check_conftest "$CODE" "NV_THERMAL_ZONE_DEVICE_PRIV_PRESENT" "" "functions" ;; + thermal_zone_for_each_trip) + # + # Determine if the function thermal_zone_for_each_trip is present. + # + # thermal_zone_for_each_trip was added in commit a56cc0a833852 + # ("thermal: core: Add function to walk trips under zone lock") + # in v6.6-rc3 (2023-10-03) + # + CODE=" + #include + int conftest_thermal_zone_for_each_trip(void) { + return thermal_zone_for_each_trip(); + }" + + compile_check_conftest "$CODE" "NV_THERMAL_ZONE_FOR_EACH_TRIP_PRESENT" "" "functions" + ;; + tegra_dev_iommu_get_stream_id) # # Determine if the function tegra_dev_iommu_get_stream_id is present.