drivers: Update timer APIs for Linux v6.15

In Linux v6.15, the timer APIs hrtimer_init() and del_timer() have been
removed. The hrtimer_setup() was added in Linux v6.13 to replace
hrtimer_init() and hrtimer_init() have finally been removed. The
functions del_timer()/del_timer_sync() were renamed to
timer_delete()/timer_delete_sync() in Linux v6.15. Use conftest to
detect these changes and update the drivers as necessary.

JIRA LINQPJ14-47

Change-Id: Id3994900384aad4b91155507cda91e04898ab12c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336168
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
Jon Hunter
2025-04-08 13:30:51 +01:00
parent 1d9d3c1755
commit a59a10dfeb
13 changed files with 125 additions and 23 deletions

View File

@@ -149,6 +149,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += fop_unsigned_offset
NV_CONFTEST_FUNCTION_COMPILE_TESTS += genpd_xlate_t_has_const_of_phandle_args
NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_file_rcu_has_double_ptr_file_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_user_pages
NV_CONFTEST_FUNCTION_COMPILE_TESTS += hrtimer_setup
NV_CONFTEST_FUNCTION_COMPILE_TESTS += icc_get
NV_CONFTEST_FUNCTION_COMPILE_TESTS += icc_put
NV_CONFTEST_FUNCTION_COMPILE_TESTS += icc_set_bw
@@ -222,6 +223,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_ivc_use_ivc_ext_driver
NV_CONFTEST_FUNCTION_COMPILE_TESTS += thermal_zone_device_priv
NV_CONFTEST_FUNCTION_COMPILE_TESTS += thermal_zone_device_ops_struct_has_get_trip_type
NV_CONFTEST_FUNCTION_COMPILE_TESTS += thermal_zone_for_each_trip
NV_CONFTEST_FUNCTION_COMPILE_TESTS += timer_delete
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

View File

@@ -7682,6 +7682,22 @@ compile_test() {
compile_check_conftest "$CODE" "NV_GPIO_DEVICE_GET_CHIP_PRESENT" "" "functions"
;;
hrtimer_setup)
#
# Determine if the function hrtimer_setup() is present.
#
# This change was made in Linux v6.13 by commit 908a1d775422
# ("hrtimers: Introduce hrtimer_setup() to replace hrtimer_init()").
#
CODE="
#include <linux/hrtimer.h>
bool conftest_hrtimer_setup(void) {
return hrtimer_setup();
}"
compile_check_conftest "$CODE" "NV_HRTIMER_SETUP_PRESENT" "" "functions"
;;
netif_set_tso_max_size)
#
# Determine if netif_set_tso_max_size() function is present
@@ -8680,6 +8696,22 @@ compile_test() {
compile_check_conftest "$CODE" "NV_TEGRA_DEV_IOMMU_GET_STREAM_ID_PRESENT" "" "functions"
;;
timer_delete)
#
# Determine if the function timer_delete() is present.
#
# This change was made in Linux v6.15 by commit 8fa7292fee5c
# ("treewide: Switch/rename to timer_delete[_sync]()").
#
CODE="
#include <linux/timer.h>
bool conftest_timer_delete(void) {
return timer_delete();
}"
compile_check_conftest "$CODE" "NV_TIMER_DELETE_PRESENT" "" "functions"
;;
tty_operations_struct_send_xchar_has_u8_arg)
#
# Determine if the struct tty_operations::send_xchar argument is of type u8.