mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
soc/tegra: bpmp: Fix build for Linux v6.9
In Linux v6.9-rc1, the typedef genpd_xlate_t was updated to make 'of_phandle_args' argument const. Add a test to the conftest script to test if this argument is const and update the BPMP powergate driver accordingly. Bug 4471899 Change-Id: I85ddb3689ccf5dc769cd208575db69a2cf7b0a11 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103819 Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
3b9f5783b2
commit
9c180ac0c8
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -305,7 +305,11 @@ static void tegra_bpmp_remove_powergates(struct tegra_bpmp *bpmp)
|
||||
}
|
||||
|
||||
static struct generic_pm_domain *
|
||||
#if defined(NV_GENDPD_XLATE_T_HAS_CONST_OF_PHANDLE_ARGS)
|
||||
tegra_powergate_xlate(const struct of_phandle_args *spec, void *data)
|
||||
#else
|
||||
tegra_powergate_xlate(struct of_phandle_args *spec, void *data)
|
||||
#endif
|
||||
{
|
||||
struct generic_pm_domain *domain = ERR_PTR(-ENOENT);
|
||||
struct genpd_onecell_data *genpd = data;
|
||||
|
||||
@@ -119,6 +119,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_scdc_get_set_has_struct_drm_connector_
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_coalesce_has_coal_and_extack_args
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_ringparam_has_ringparam_and_extack_args
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ethtool_ops_get_set_rxfh_has_rxfh_param_args
|
||||
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 += i2c_new_client_device
|
||||
|
||||
@@ -7075,6 +7075,26 @@ compile_test() {
|
||||
"NV_ETHTOOL_OPS_GET_SET_RXFH_HAS_RXFH_PARAM_ARGS" "" "types"
|
||||
;;
|
||||
|
||||
genpd_xlate_t_has_const_of_phandle_args)
|
||||
#
|
||||
# Determine if genpd_xlate_t function pointer has a
|
||||
# 'const struct of_phandle_args' argument.
|
||||
#
|
||||
# Commit 4d0824608a63 ("pmdomain: core: constify of_phandle_args in xlate")
|
||||
# updated the typedef of genpd_xlate_t to make of_phandle_args argument const.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/pm_domain.h>
|
||||
void conftest_genpd_xlate_t_has_const_of_phandle_args(struct genpd_onecell_data *gpd,
|
||||
const struct of_phandle_args *args,
|
||||
void *data)
|
||||
{
|
||||
gpd->xlate(args, data);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_GENDPD_XLATE_T_HAS_CONST_OF_PHANDLE_ARGS" "" "types"
|
||||
;;
|
||||
|
||||
netif_set_tso_max_size)
|
||||
#
|
||||
# Determine if netif_set_tso_max_size() function is present
|
||||
|
||||
Reference in New Issue
Block a user