mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
video: tegra: virt: Fix build for Linux v6.9
The definition SLAB_MEM_SPREAD was removed in Linux v6.9 and this breaks the compilation of the Tegra Graphics Virtualization Comms driver. Add a test to conftest to detect if SLAB_MEM_SPREAD is defined and update the driver accordingly to fix the build. Bug 4471899 Change-Id: Ibcac2dbc6538bcda92e818b333a9db6b8234f1d7 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104558 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
9c180ac0c8
commit
7acb255112
@@ -1,10 +1,12 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
// SPDX-FileCopyrightText: Copyright (c) 2013-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2023, NVIDIA Corporation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Tegra Graphics Virtualization Communication Framework
|
* Tegra Graphics Virtualization Communication Framework
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/semaphore.h>
|
#include <linux/semaphore.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
@@ -361,7 +363,11 @@ int tegra_gr_comm_init(struct device *dev, struct device_node *dn, u32 elems,
|
|||||||
queue->element_cache =
|
queue->element_cache =
|
||||||
kmem_cache_create(name,
|
kmem_cache_create(name,
|
||||||
sizeof(struct gr_comm_element) + size, 0,
|
sizeof(struct gr_comm_element) + size, 0,
|
||||||
|
#if defined(NV_SLAB_MEM_SPREAD)
|
||||||
SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD, NULL);
|
SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD, NULL);
|
||||||
|
#else
|
||||||
|
SLAB_RECLAIM_ACCOUNT, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!queue->element_cache) {
|
if (!queue->element_cache) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epf_driver_struct_probe_has_id_arg
|
|||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_irq_type_enum_present
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pci_epc_irq_type_enum_present
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += register_shrinker_has_fmt_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += shrinker_alloc
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += shrinker_alloc
|
||||||
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += slab_mem_spread
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_pins
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_component_driver_struct_has_non_legacy_dai_naming
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_component_driver_struct_has_non_legacy_dai_naming
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_dai_link_struct_has_c2c_params_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_dai_link_struct_has_c2c_params_arg
|
||||||
|
|||||||
@@ -7407,6 +7407,23 @@ compile_test() {
|
|||||||
compile_check_conftest "$CODE" "NV_SHRINKER_ALLOC_PRESENT" "" "functions"
|
compile_check_conftest "$CODE" "NV_SHRINKER_ALLOC_PRESENT" "" "functions"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
slab_mem_spread)
|
||||||
|
#
|
||||||
|
# Determine if SLAB_MEM_SPREAD is defined.
|
||||||
|
#
|
||||||
|
# Commit f88c3fb81c4b ("mm, slab: remove last vestiges of
|
||||||
|
# SLAB_MEM_SPREAD") removed the definition SLAB_MEM_SPREAD in
|
||||||
|
# Linux v6.9. This definition is no longer supported and can
|
||||||
|
# be removed for v6.9+ kernels.
|
||||||
|
CODE="
|
||||||
|
#include <linux/slab.h>
|
||||||
|
void conftest_slab_mem_spread(void) {
|
||||||
|
slab_flags_t flags = SLAB_MEM_SPREAD;
|
||||||
|
}"
|
||||||
|
|
||||||
|
compile_check_conftest "$CODE" "NV_SLAB_MEM_SPREAD" "" "functions"
|
||||||
|
;;
|
||||||
|
|
||||||
snd_soc_card_jack_new_has_no_snd_soc_jack_pins)
|
snd_soc_card_jack_new_has_no_snd_soc_jack_pins)
|
||||||
#
|
#
|
||||||
# Determine if the function snd_soc_card_jack_new() has 'pins' and
|
# Determine if the function snd_soc_card_jack_new() has 'pins' and
|
||||||
|
|||||||
Reference in New Issue
Block a user