In Linux v5.19, the arguments to the 'suspend' function pointer defined
in the structure 'ufs_hba_variant_ops' was updated to add a 'status'
argument. Add a new test to the conftest script that checks if the
'suspend' function has a 'status' argument and use the definition
created by conftest to select which structure member is used.
This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.
Bug 4221847
Change-Id: I05011a4a1aff7c54cd258147d6519b696904a2de
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996214
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Determine if struct class_attribute function has const type
"struct class_attribute" argument or not.
Modified the argument by change
commit 75a2d4226b5371 ("driver core: class: mark the struct class
for sysfs callbacks as constant") for Linux 6.3
Bug 4346767
Change-Id: I2a36025b23af80761faf1da406481731289eedd2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030734
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Use conftest to determine if the struct pci_epf_driver probe
API has ID argument or not
The additional argument as ID is added in probe() of the
struct pci_epf_driver with commit 081c715dfd5054 ("PCI:
endpoint: Pass EPF device ID to the probe function")
in Linux 6.4.
Bug 4346767
Change-Id: I004d1d3a8df922c0534c5631baa26f82f6992e4d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030052
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to find if function v4l2_async_subdev_nf_init() is present
or not.
In Linux 6.5, with change commit bda8953e8c3e7e ("media: v4l: async:
Drop v4l2_async_nf_parse_fwnode_endpoints()"), added the function
v4l2_async_subdev_nf_init() and dropped v4l2_async_nf_init().
Bug 4346767
Change-Id: I345db2acf0a07d05722611d9eacc7134aff0c35a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028766
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to determine if the 'enum v4l2_async_match_type'
has the "TYPE" in its name.
In Linux 6.5, with change commit 7a2259fc5182b ("media: v4l: async:
Rename V4L2_ASYNC_MATCH_ macros, add TYPE_"), the enum names has "TYPE" also.
Bug 4346767
Change-Id: I863da8496337d4003188b654673c67cdb3eef155
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028745
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to find if struct v4l2_async_connection present
or not. The struct v4l2_async_subdev is renamed to struct
v4l2_async_connection with change commit adb2dcd5f2d49d3
("media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection")
in Linux 6.5
Bug 4346767
Change-Id: Id15c8ce747a8642b7831b79f45e15f26e95744b2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028744
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to find if struct snd_soc_dai_ops have the probe()
callback or not. In Linux 6.5, commit 516ee7009ff20 ("ASoC:
tegra: merge DAI call back functions into ops") added probe()
callback into the struct snd_soc_dai_ops.
Bug 4346767
Change-Id: If292f10d6e52a2cf80c7700ff7aba5805041531f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028743
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to find if API pci_disable_pcie_error_reporting()
is present. This API is dropped from Linux 6.5 with change
commit 69b264df8a41282 ("PCI/AER: Drop unused
pci_disable_pcie_error_reporting()")
Bug 4346767
Change-Id: Idcaf36e4215a874c70f7457a46fd875f1349b121
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028741
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
In Linux v6.6, the header net/page_pool.h was split into two headers;
net/page_pool/helper.h and net/page_pool/types.h. Use the conftest
script to detect which of these headers are present and generate compile
time definitions for including the appropriate headers.
Bug 4346767
Change-Id: I389ce5b867a1efd867b8392bb21383784c1b4af6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026553
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Add tests to conftest for detecting if the mii_bus structure has the
read_c45 and write_c45 function pointers and use the definitions
generated by conftest in the nvethernet driver.
This fixes support for nvethernet in 3rd party Linux kernels that have
backported the mii_bus structure changes to their kernel that have a
kernel version prior to Linux v6.3.
Bug 4014315
Change-Id: I5ae98fc5077337286921da6e9347df9781565a70
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3018212
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.
Note that the function snd_soc_dai_init_dma_data() has been present
in the Linux kernel since v3.13 and so use this for all kernel versions.
In Linux v6.3, the 'playback_dma_data' and 'capture_dma_data' members of
the snd_soc_dai_driver structure were replaced and so these could no
longer be set directly. However, the arguments to
snd_soc_dai_init_dma_data() have not changed and so can be used for
older kernels and well has the current.
This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.
Bug 4221847
Change-Id: Ibac0c6bab78e93f03981dfe3d1b2025ea19d4c92
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993795
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.
This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.
Bug 4221847
Change-Id: I159cd7d5feca050c8a8014d9c2a3b43e8974fdfd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993807
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The test to see if the function __alloc_disk_node() has the 'lkclass'
argument is not working as expected and so builds for Linux v5.18 and
Linux v5.19 are failing. The problem is that the type 'NULL' is not
defined and so the test always fails. Fix this by using the
'lock_class_key' type and including the appropriate headers.
Bug 4221847
Change-Id: I6b3d6987d0d3250f00c27c586d6a971a3dceac59
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994321
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.
This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.
Bug 4221847
Change-Id: Iec2c793ce408dab1cf7e5118c019dfe656dfa87c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2992630
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.5, commit 62aeaeaa1b26 ("drm/aperture: Remove primary
argument") removed the 'primary' argument from the function
drm_aperture_remove_framebuffers(). Update the test in conftest script
for drm_aperture_remove_framebuffers() to test for this and use the
generated definition accordlingly in the Tegra DRM driver to fix the
build for Linux v6.5.
Bug 4221847
Change-Id: I7a7bb3a029b236e0ce42c1a404085757d95374d1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990528
In Linux v6.5, the arguments to the function snd_soc_of_get_dai_name()
were updated and this is causing the Tegra ASoC machine driver build to
fail. Add a new test to the conftest script to check the arguments for
snd_soc_of_get_dai_name() and use the definition generated by the
conftest script accordingly.
Bug 4221847
Change-Id: I32772da12ab59eb09e2f9d8bc66471d859201f8e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990531
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.5, the 'vmas' parameter is removed from get_user_pages() by
commit 54d020692b34 ("mm/gup: remove unused vmas parameter from
get_user_pages()"). Update the conftest script test for
'get_user_pages' to test for this and use the generated definition in
the NVMAP driver accordingly.
Bug 4221847
Change-Id: I3b2b2b9937bba86a8924cf5852fe62d57cd5d3b6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990512
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.4, the 'params' member of the snd_soc_dai_link was replaced
with the 'c2c_params' member. Add a new test to the conftest script that
checks if the 'c2c_params' structure member is present and use the
definition created by conftest to select which structure member is used.
Bug 4221847
Change-Id: I7ebb4187fd1cd70097bf65409bda3b2a6830a303
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989731
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.4, the various drm_scdc_get/set functions were updated to
take an argument of type 'struct drm_connector'. Add a new test to the
conftest script that checks if this argument is used and use the
definition created by conftest to select which version of the function
is used.
Bug 4221847
Change-Id: Id6b6396bbe875a0268f8fe2f68ae08f78a32c954
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989035
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.4, the module pointer argument is removed from the
class_create() function. Add a test to the conftest script that checks
if this argument for the class_create() function has been removed and
use the definition created by conftest to select which version of the
function is used.
Bug 4183168
Bug 4221847
Change-Id: I440e4b318001886cd0319bb3499ba33178475e8c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989020
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.4, the macro DEFINE_SEMAPHORE was updated and this breaks
the build for the ch384 serial driver. Add a new test to the conftest
script that checks if the macro DEFINE_SEMAPHORE takes a number argument
and use the definition created by conftest to select which version of
the macro is used.
Bug 4183168
Bug 4221847
Change-Id: Ie1bcb95b07e792c70fa52e22465bdf565dc456af
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989732
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The r8168 driver fails to build with Linux v6.5 because the
skb_gso_segment() is not found ...
drivers/net/ethernet/realtek/r8168_n.c:29231:24: error: implicit
declaration of function ‘skb_gso_segment’; did you mean
‘skb_gso_reset’? [-Werror=implicit-function-declaration]
segs = skb_gso_segment(skb, features);
^~~~~~~~~~~~~~~
Commit d457a0e329b0 ("net: move gso declarations and functions to their
own files") moved the definition to a new file 'net/gso.h'. Fix this by
updating the conftest Makefile to check for the presence of this header
file and use the definition generated by conftest accordingly in the
r8168 driver.
Bug 4221847
Change-Id: I6ad83a06602ef0679a76ff1a6e5ddabbcb1bfe00
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990521
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Add the updated Tegra SE driver with the below improvements.
- Remove dependency with nvhost apis and use upstream Host1x APIs.
- Implement software fallbacks for keys/plaintexts unsupported by
hardware.
- Support only T234 and later. Prior chips will use tegra-se-nvhost
driver.
Bug 4221414
Bug 3579794
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I398a5b7cc3f752b44d01d6d1c81f813f862e4cd9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2977810
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Instead of relying on kernel version to determine if functions or
specific versions of functions are present in the kernel, add compile
time tests to the conftest.sh script to determine this at compile time
for the kernel being used. This is beneficial for working with 3rd party
Linux kernels that may have back-ported upstream changes into their
kernel and so the kernel version checks do not work.
Bug 4119327
Change-Id: I79e701940ca70ca4d66500c75b5992f9d92b54b0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2985744
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Instead of relying on kernel version to determine if the 'tegra_ivc'
structure has a member that is of type 'struct iosys_map', add a compile
time test to the conftest.sh script to determine this at compile time
for the kernel being used. This is beneficial for working with 3rd party
Linux kernels that may have back-ported upstream changes into their
kernel and so the kernel version checks do not work.
Bug 4119327
Change-Id: Ia993ca9df7694347252a795c7dee1e95f2f9fa2f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2985743
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Instead of relying on kernel version to determine if the 'remove'
callback for the 'bus_type' structure return an integer or void, add a
compile time test to the conftest.sh script to determine this at compile
time for the kernel being used. This is beneficial for working with 3rd
party Linux kernels that may have back-ported upstream changes into
their kernel and so the kernel version checks do not work.
Bug 4119327
Change-Id: I5457300619f5fb3b6afe61742bc6fce4cbefcd5d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2985719
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Instead of relying on kernel version to determine if the
register_shrinker() function has the 'fmt' argument, use the conftest.sh
script to test if this argument is present at compile time. This is
beneficial for working with 3rd party Linux kernels that may have
back-ported upstream changes into their kernel and so the kernel version
checks do not work.
Bug 4119327
Change-Id: I0cbde2dfc2affc41e93eee1f3a195dbc0f8f5667
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2984429
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Instead of relying on kernel version to determine if certain functions
or structure are present in the kernel, use the conftest.sh script to
test which functions, structures, etc are present at compile time. This
is beneficial for working with 3rd party Linux kernels that may have
back-ported upstream changes into their kernel and so the kernel version
checks do not work.
Bug 4119327
Change-Id: I56281fa5d95862338bd8a43d6e22225c27590462
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2984422
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Instead of relying on kernel version to determine if certain functions
or structure are present in the kernel, use the conftest.sh script to
test which functions, structures, etc are present at compile time. This
is beneficial for working with 3rd party Linux kernels that may have
back-ported upstream changes into their kernel and so the kernel version
checks do not work.
Bug 4119327
Change-Id: If315b18af74c830e9ba3993208de3a3326c4187d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2984415
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
BMI088 driver was failing to build for Kernel version
> 6.2 and the following error is seen:
drivers/bmi088/bmi088_core.c:1043:42: error: 'struct iio_dev'
has no member named 'mlock'
mutex_lock(&st->snsrs[hw].bmi_iio->mlock);
mlock field is moved from indio_dev to iio_dev_opaque
structure from v6.2 onwards. Instead of using kernel
version, use conftest.sh script which checks for the
'mlock' field in iio_dev_opaque structure or not.
Bug 4190630
Change-Id: Icc540edd916718d30460b314600c20e70144b1d6
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2983266
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>