pci: Add conftest to determine if msi_get_virq() present

The API msi_get_virq() get added by commit 98043704f375 ("genirq/msi:
Make msi_get_virq() device domain aware") in Linux v6.1. Use
conftest to determine if this API is available or not.

Jira HOSTX-5375

Change-Id: I5e4cef9622d852fc889d9652e6631a79f2d21f9b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166766
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Laxman Dewangan
2024-07-02 11:38:19 +00:00
committed by mobile promotions
parent b260a8f442
commit 00a95facef
3 changed files with 21 additions and 4 deletions

View File

@@ -136,6 +136,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_read_c45
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_write_c45
NV_CONFTEST_FUNCTION_COMPILE_TESTS += media_entity_remote_pad
NV_CONFTEST_FUNCTION_COMPILE_TESTS += module_import_ns_macro
NV_CONFTEST_FUNCTION_COMPILE_TESTS += msi_get_virq
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_napi_add_weight
NV_CONFTEST_FUNCTION_COMPILE_TESTS += of_get_named_gpio_flags

View File

@@ -1192,6 +1192,22 @@ compile_test() {
compile_check_conftest "$CODE" "NV_MDEV_DRIVER_HAS_SUPPORTED_TYPE_GROUPS" "" "types"
;;
msi_get_virq)
#
# Determine if msi_get_virq() function is present or not
#
# Added by commit 98043704f375 ("genirq/msi: Make msi_get_virq()
# device domain aware") in Linux V6.1
#
CODE="
#include <linux/msi.h>
void conftest_msi_get_virq() {
msi_get_virq();
}"
compile_check_conftest "$CODE" "NV_MSI_GET_VIRQ_PRESENT" "" "functions"
;;
vfio_device_ops_has_dma_unmap)
#
# Determine if 'vfio_device_ops' struct has 'dma_unmap' field.