In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Update the mods_dmabuf driver as
necessary to fix this.
Bug 4991705
Change-Id: I9326e360fe8daae4c43941812301818d8b35c825
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263799
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the MODS drivers as
necessary to fix this. Note that we can simply remove the mods_dmabuf
'remove' function because it does nothing.
Bug 4749580
Change-Id: I8ac05a7b713916b9aca1694ca828682808df3287
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235514
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
The MODULE_IMPORT_NS macro adds a namespace tag to the module
information. The DMA_BUF namespace is required for Linux v5.16+ kernels
for drivers that use DMA BUF, there is no reason not to populate this
for earlier kernels. Furthermore, some 3rd party kernels prior to v5.16
may require this too and so drop the version check around the DMA BUF
namespace.
Bug 4119327
Change-Id: If8a5e90340f7a0582247cb91611d275ec1f4990e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979260
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
* Add new cl_* macros for printing client-specific messages.
This adds client index to messages in code which is called from
user space. This makes it easier to diagnose errors when multiple
clients (processes) open the driver.
* Use kernel print levels appropriate to messages being printed.
* Print process pid when opening the driver.
* Print information about access token being set or released.
* Print information about PCI devices being enabled or disabled.
PCI device enablement is tied to the driver getting ownership
of the device. It also prevents multiple MODS instances from
owning the same PCI device.
* Print info about device DMA mask, print device DMA mask when DMA
mapping fails.
* Print more info about SRIOV actions.
* Disable SRIOV when the driver is being closed by the process
which enables SRIOV. Leaving SRIOV enabled when disabling PCI
device is an error and leads to stale functions, unusable on
subsequent MODS runs.
* Clean up log messages in a few places.
Change-Id: I51953e984a55c0990e90f89d8260f215c8c58498
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2279439
Tested-by: Ellis Roberts <ellisr@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The sg->length may happen to be a large size, and this
will overflow the local segment_size when accumulating
sg->length to it at line "segment_size += sg->length".
Since segment_size of MODS_DMABUF_GET_PHYSICAL_ADDRESS
structure is defined in u64 type, this patch fixes the
bug by changing the local varible to u64 as well.
Bug 2521255
Change-Id: Id1fb6d149f55f4fd9238a399393ed2efae77c84a
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2105445
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>