Commit Graph

5 Commits

Author SHA1 Message Date
Jon Hunter
ce678a37b1 drivers: Add conftest test for class_create
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>
2023-10-05 17:54:05 -07:00
Shardar Mohammed
4be2dd36bb nvidia-oot: remove module * from class_create()
Remove the module pointer from the class_create() based
on following change in core kernel

======
driver core: class: remove module * from class_create()

The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
=====

Bug 4276500

Change-Id: Ifa0a92a282151ce12dc4a48f4f4b5b9499d3fbd8
Signed-off-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976600
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-08 18:09:50 -07:00
Nitin Kumbhar
0f04078fb6 drivers: nv-virtio-poc: fix coverity issues
Fix issues about unused value of err and overwriting write_size
value.

write_size:
assigned_value: Assigning value from err to write_size here, but that
stored value is overwritten before it can be used.
...
value_overwrite: Overwriting previous write to write_size with value
from copied.

err:
returned_value: Assigning value from nvvc_process_rxdataavaiable()
to err here, but that stored value is overwritten before
it can be used.

CID 10174057
CID 10174058

Bug 3952896

Change-Id: I21ef42b7c1c3fec83e558f80d954b65dbb14a5b8
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2969244
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-30 20:33:26 -07:00
Bharat Nihalani
0f7f6190a1 nv-virtio-poc: Include correct header
This driver was including <linux/tegra-ivc.h> that uses deprecated
CONFIG_TEGRA_HV_MANAGER. This caused all tegra_hv functions to be
stubbed.

With K5.15, a new header <soc/tegra/virt/hv-ivc.h> should be
used instead that makes use of CONFIG_TEGRA_VIRTUALIZATION which
is enabled as part of the kernel build flow. With this header
included, all tegra_hv functions are correctly linked.

Also, there is no need to include tegra_hv.h as this driver
does not use the functions declared in that header.

Bug 4206871

Change-Id: I6ef6e2cf5f2c88dab015c2f10913ede4fdfd5583
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954916
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-17 20:27:27 -07:00
Nitin Kumbhar
8472163ba0 drivers: nv virtio poc console driver
Add a back-end char driver to implement a virtio console driver which
handles a part of virtio mmio protocol to send and receive data
from a peer VM. IVC queue and mempool are used for this communication.

Also, this driver adds blocking read, write and poll ops for an
user-space application.

JIRA TSSKERNEL-1
Bug 4050146

This change also cherry-picks the fix pushed in linux-nvidia repo:
https://git-master.nvidia.com/r/c/linux-nvidia/+/2918779

Change-Id: I97a88f1dd4eb9e3ac7e1e94439f3ebc8ac933239
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2898234
(cherry picked from commit 10436d9d5bfbbf11ffc63771189b57fdf94e50f6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2936644
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2023-07-21 11:58:30 -07:00