diff --git a/drivers/pci/controller/pcie-tegra264.c b/drivers/pci/controller/pcie-tegra264.c index a406820a..b7f13477 100644 --- a/drivers/pci/controller/pcie-tegra264.c +++ b/drivers/pci/controller/pcie-tegra264.c @@ -99,7 +99,7 @@ static int tegra264_pcie_parse_dt(struct tegra264_pcie *pcie) static void tegra264_pcie_bpmp_set_rp_state(struct tegra264_pcie *pcie) { -#if defined(NV_MRQ_PCIE_REQUEST_STRUCT_PRESENT) && defined(CMD_PCIE_RP_CONTROLLER_OFF) +#if defined(NV_MRQ_PCIE_REQUEST_STRUCT_PRESENT) && defined(NV_CMD_PCIE_RP_CONTROLLER_OFF_ENUM_PRESENT) struct tegra_bpmp_message msg; struct mrq_pcie_request req; int err; diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index 1a56ab39..1dcc6c25 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -112,6 +112,7 @@ 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 += clk_hw_determine_rate_no_reparent +NV_CONFTEST_FUNCTION_COMPILE_TESTS += cmd_pcie_rp_controller_off_enum_present NV_CONFTEST_FUNCTION_COMPILE_TESTS += cyclecounter_struct_read_has_const_cyclecounter_arg NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_arg NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_dev_profile_has_is_cooling_device diff --git a/scripts/conftest/conftest.sh b/scripts/conftest/conftest.sh index 83820acb..008495bd 100755 --- a/scripts/conftest/conftest.sh +++ b/scripts/conftest/conftest.sh @@ -6945,6 +6945,23 @@ compile_test() { compile_check_conftest "$CODE" "NV_CLK_HW_DETERMINE_RATE_NO_REPARENT_PRESENT" "" "functions" ;; + cmd_pcie_rp_controller_off_enum_present) + # + # Determine if the enum mrq_pcie_cmd defines the values + # CMD_PCIE_RP_CONTROLLER_OFF. + # + # This is only defined in NVIDIA kernels at the moment. + # + CODE=" + #include + #include + int conftest_cmd_pcie_rp_controller_off_enum_present(void) { + return CMD_PCIE_RP_CONTROLLER_OFF; + }" + + compile_check_conftest "$CODE" "NV_CMD_PCIE_RP_CONTROLLER_OFF_ENUM_PRESENT" "" "types" + ;; + cyclecounter_struct_read_has_const_cyclecounter_arg) # # Determine if the 'cyclecounter' structure 'read' function pointer