blk: vblk: Fix build for Linux v6.15

In Linux v6.15, the 'request_queue' parameter was removed from the
function blk_rq_map_sg(). Add a conftest to check for this and update
the Tegra HV VBLK driver accordingly.

JIRA LINQPJ14-47

Change-Id: I140200fe7acbaebb383abd7939153178f0ca484a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330664
(cherry picked from commit a20fde1ade16dbfbac3f48327c360ca0a7c36545)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3475292
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
Jon Hunter
2025-03-25 15:54:48 +00:00
committed by mobile promotions
parent 3fba8947fb
commit 3d26747166
3 changed files with 24 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_mq_alloc_disk_for_queue
NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_mq_alloc_queue
NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_mq_destroy_queue
NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_queue_max_hw_sectors
NV_CONFTEST_FUNCTION_COMPILE_TESTS += blk_rq_map_sg_has_no_queue_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += block_device_operations_open_has_gendisk_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += block_device_operations_release_has_no_mode_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += bus_type_struct_match_has_const_drv_arg

View File

@@ -6708,6 +6708,25 @@ compile_test() {
"NV_BLOCK_DEVICE_OPERATIONS_RELEASE_HAS_NO_MODE_ARG" "" "types"
;;
blk_rq_map_sg_has_no_queue_arg)
#
# Determine if blk_rq_map_sg() no longer takes a request_queue parameter.
#
# Commit 75618ac6e98f ("block: remove unused parameter 'q' parameter
# in __blk_rq_map_sg()") removed the 'request_queue' parameter from the
# function blk_rq_map_sg() in Linux v6.15.
#
CODE="
#include <linux/blk-mq.h>
int conftest_blk_rq_map_sg_has_no_queue_arg(struct request *rq,
struct scatterlist *sg) {
return blk_rq_map_sg(rq, sg);
}"
compile_check_conftest "$CODE" "NV_BLK_RQ_MAP_SG_HAS_NO_QUEUE_ARG" "" "types"
;;
bus_type_struct_match_has_const_drv_arg)
#
# Determine if the 'match' callback from the 'bus_type' structure