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
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2025-03-25 15:54:48 +00:00
parent b21532e8c8
commit 04e5d3eac8
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 += queue_limits_struct_has_features

View File

@@ -6733,6 +6733,25 @@ compile_test() {
"NV_BLK_MQ_F_SHOULD_MERGE" "" "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"
;;
queue_limits_struct_has_features)
#
# Determine if the 'queue_limits' needs to use