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
(cherry picked from commit 7acb255112)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104650
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2024-03-26 13:45:31 +00:00
committed by mobile promotions
parent 1a5be9188a
commit f78df7fa59
3 changed files with 26 additions and 2 deletions

View File

@@ -7329,6 +7329,23 @@ compile_test() {
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)
#
# Determine if the function snd_soc_card_jack_new() has 'pins' and