Chris Dragan
4b0df5164d
misc: mods: fix error handling in ACPI
...
Bug 3745813
Change-Id: I447112fba3298e043e081887f80f06be235755da
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801186
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Chris Dragan
dfdd158c0d
misc: mods: check user input in PCI functions
...
Bug 3745813
Change-Id: I47f12130624712eb45d42de1ee3960e81dc006d3
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2798253
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Chris Dragan
9c29141faa
misc: mods: fix types of a few variables
...
Bug 3745813
Change-Id: I2669c233bb5b53befc6fb4d72a8a7b35c3ea3f83
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2797668
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Chris Dragan
53daab8b1f
misc: mods: CERT-C L2 fixes
...
Bug 3745813
Change-Id: If58b0739ca7bca5373e400d0a9468ac4e5e2970a
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2797153
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Ian Grissom
83d81ef365
misc: mods: add IPI ioctls
...
* Added ioctl for triggering IPIs
* Added handler to invoke ASM wfe,wfi commands or NOP
Change-Id: I907b6a27f3a7f3ff5b507e9f91066d8695dadbb4
Signed-off-by: Ian Grissom <igrissom@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2730675
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Chris Dragan
e01a6e01a0
misc: mods: add new ioctls
...
Add ioctls to read device properties and map proximity id to NUMA node.
Bug 3538850
Change-Id: I65b6decbdfbe12de7d1f1eb3edbb71b9fd56fb8a
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2786128
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Chris Dragan
47a9a4cd68
misc: mods: fix compilation with kernel 6.0
...
Update to accommodate changes in ACPI API.
Bug 3767126
Change-Id: I20d1d046d2aa59966e9e6eeb04fef8bac7026886
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2782042
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Keyur Patel <keyurap@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
andersm
8aad6c65fc
MODS: add mods_tegra_dma platform driver
...
For upstream dma engine slave_id in <struct dma_slave_config> is obsolete.
The Correct way to specify slave_id is
to call dma_request_chan API along with device name defined in dts node.
mods_tegra_dma: mods_tegra_dma {
compatible = "nvidia,mods_tegra_dma";
dmas = <&gpcdma 15>, <&gpcdma 16>;
dma-names = "spi1_rx", "spi2_tx";
status = "okay";
};
To keep kernel ABI compatibility,
add a new ioctl cmd MODS_ESC_DMA_REQUEST_HANDLE_2.
A new struct MODS_DMA_HANDLE_2 is used together with it.
A new function esc_mods_dma_request_channel_2 is implemented accordingly.
JIRA:TM-728
Change-Id: Ic84f294e2248d800b9aacd597a7ce0a84fc94a1d
Signed-off-by: andersm <andersm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2711537
Signed-off-by: xueyuanb <xueyuanb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2753148
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Chris Dragan
da482657b7
misc: mods: improve memory allocation
...
Bug 3760541
Change-Id: I999b676ee3ef8c5b0882d4b3bdcd076346879856
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2776654
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Chris Dragan
9985faf0fc
misc: mods: kernel 6.0 compilation fix
...
Bug 3767126
Change-Id: I16c743bb5943eb78090072c32b6230b078f601d8
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2775928
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Keyur Patel <keyurap@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-03 13:27:53 +00:00
Jason Li
39a71c5c65
misc: mods: optee: Fix cert-c issues
...
This change fixes two cert-c issues with implicit conversion
from unsigned long long to unsigned int.
CID 556497
CID 556498
Bug 3745813
Change-Id: I3013b204f975c2c0154d5b56593a49b0fbe47cb0
Signed-off-by: Jason Li (SW-TEGRA) <jasl@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2757547
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Joseph Lo <josephl@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
b25e80150e
misc: mods: update from Perforce
...
Change-Id: I50cacf7e5f16a8d0a087becf984c28a2ba516d43
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2747397
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Jason Li (SW-TEGRA)
aa01c9a907
misc: mods: Add OP-TEE TA communication support
...
This patch adds OP-TEE TA support in the mods driver
using Linux kernel TEE API.
Jira OPTEE-40
Signed-off-by: Jason Li (SW-TEGRA) <jasl@nvidia.com >
Change-Id: I75338f3b6941419acc0745b374c79035a58c98c7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2708753
(cherry picked from commit 33520bc012e8e0b5cfb5de341ff8ff488df8a68f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2709426
Reviewed-by: Rohith Talluri <sitalluri@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Tested-by: Rohith Talluri <sitalluri@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
14ab31a527
misc: mods: fix potential integer overflow
...
Bug 3461002
CID 10138562
Change-Id: I788b036fe53a248c45c808ad91696bdbdda2ad9b
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729925
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
20730c6ceb
misc: mods: fix compilation with kernel 5.17
...
Bug 3604749
Change-Id: I159a9d809d813184943295d7ac58eed0f35df497
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729857
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
4974a781b6
misc: mods: fix compilation with kernel 5.18
...
Integrates CL 31407382.
Bug 3680536
Change-Id: I5a50dc1c5af1dfcc52aa112269f6802e447206d4
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2729243
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
d8714b7da4
misc: mods: add support for kstable
...
Bug 3660609
Change-Id: Iaa6e4e048afc1a1e26d5dccc361a18322a23b47e
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2726143
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Prateek Patel
86c8a8033d
core: include: Fix cert_c defect
...
Signed index may evaluate to an address that could be at negative
offset of an array. Use unsigned indexing.
CID 479265
CID 452753
Bug 3512545
Change-Id: Iaae22838305aeeafb3ebaecc497fe1556749c5c2
Signed-off-by: Prateek Patel <prpatel@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2701054
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
c7fe179f62
misc: mods: fix bugs and style issues
...
* Fixed __user and __iomem pointer types.
* Added __poll_t for poll() return type if possible.
* Fixed error return from poll().
* Fixed init/shutdown in mods_dma.
* Declared internal unit functions as static.
* Assign NULL to init pointers instead of 0.
Bug 3528414
Change-Id: If39a14a429e2cda5d58edb6ffd60fd13693371e6
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2688314
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Bodla Rakesh Babu
6fdf0401f7
misc: mods: Fix compilation flag
...
Fix compilation flag for tz mods, it is based on trusty
interface, guard it with CONFIG_TRUSTY.
Change-Id: I71ce90188c8c2a3d82371bb786b7e13971a06812
Signed-off-by: Bodla Rakesh Babu <rbodla@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2682655
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
koenz
5638242e6b
misc: mods: Check return value of snprintf
...
CID 432482
CID 347889
Bug 3512545
Change-Id: I8b3b9b0c3986a36fd695768e0ff15f97ef5a566e
Signed-off-by: Koen Zhao <koenz@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2677372
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
andersm
fd352dc972
misc: mods: fix issues captured by Coverity
...
CID 477507
CID 490219
CID 490880
Bug 3512545
Change-Id: I30c7f671df776dd5967427450c8a07891094ff2c
Signed-off-by: Anders Ma <andersm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2676489
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
4e5838f829
misc: mods: fix issues from Coverity
...
CID 368887
CID 382069
CID 490237
Bug 3512545
Change-Id: I955bb2cf14a64127cb5243d46ea964cb94ff4f2d
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2673080
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
5335da0508
misc: mods: fix userspace pointer type
...
Bug 3528414
Change-Id: I7376f3b51a0f1b9ee93be340634da4cf2f5fcbcc
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2668746
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Ketan Patil <ketanp@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
fc5605722c
misc: mods: fix uninitialized variable
...
CID 10127994
Bug 3461002
Change-Id: Ic1ae0abbb69fb686f59dfb176d9eecfa7758eb63
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2660727
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
13ac7c137c
misc: mods: update MODS kernel driver
...
Bug 3461002
Change-Id: I9f577323cd8034a4464953031398c39a409ad69c
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2658852
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Anshul Goel
aa915e1412
MODS Online IST SMC support
...
Summary: This change adds support in mods kernel
driver to send messages to ATF using SMC interface in
order to fetch the Online IST test results.
JIRA TM-206
Change-Id: Iafa397287d7af63d77c51308345a9dc93d3a922f
Signed-off-by: Anshul Goel <ansgoel@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2630148
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
andersm
c9052a874f
misc: mods: dmaengine terminate API update
...
- dmaengine_terminate_all API is deprecated and
- use dmaengine_terminate_sync instead
Bug 3403616
Change-Id: I87d3edfae1ea8f02ad3c78c1d862ce8bea8dab67
Signed-off-by: Anders Ma <andersm@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2614263
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Lael Jones
2ce330f11a
misc: mods: Replace CONFIG_ARCH_TEGRA
...
The perforce version of the MODS kernel driver
does not pull in any of the Tegra specific driver
functions. This prevents the perforce driver
from being compiled on any Tegra system or non
Tegra system with CONFIG_ARCH_TEGRA=y.
To allow the perforce driver to be compiled
replace CONFIG_ARCH_TEGRA with MODS_HAS_TEGRA
which is set based on CONFIG_ARCH_TEGRA in git
but left unset in perforce.
Bug 3397113
Signed-off-by: Lael Jones <lajones@nvidia.com >
Change-Id: Ie113d632c4dcc372058b9a1e3a549a70b8f7c03f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2607859
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Ellis
1658071414
misc: mods: Add ioctl to pass messages to tz app
...
Summary: This change adds support in mods kernel
driver to send messages to Trusty in order to
run tests trust zone side
Signed-off-by: Ellis Roberts <ellisr@nvidia.com >
Change-Id: I5cd0a1dcc4d1ac5543df5fb3ebec4427c1145e10
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2567469
Tested-by: Rohith Talluri <sitalluri@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Stephen Wolfe <swolfe@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
dongqiang
df0985a449
Update for Bpmp MRQ Call
...
Update Bpmp MRQ Call Api to use bpmp dtb node in mods dtb devices
Used by MODS PCIE Test for bpmp uphy api
JIRA: TM-586
Change-Id: I67b34979151fa57fd1707b2393237828f2c23cef
Signed-off-by: Carl Dong <carld@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2577098
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Danny Li <dali@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
dongqiang
62a67b00a8
Fix Smmu IOVA contiguous checking error
...
To allocate larger buffer, MODS code is allocating noncontiguous pages
and then calls dma buffer api to do smmu mapping to get a continuous
iova address. This change will fix the error when the scatterlist's
dma address is 0xffffffffffffffff, skip checking the sg since it's
already merged to the head node.
JIRA: TM-129
Signed-off-by: Carl Dong <carld@nvidia.com >
Change-Id: I45aa3b0afcf5c86179fb293cd48326b14c2f3efc
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2552672
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
16bb9a5ba0
misc: mods: update from Perforce
...
Change-Id: If7d0606ab444ba4dabc8ef317120d1d4393ef871
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2536359
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
koenz
7af9118d0a
mods-kernel-driver: BPMP Uphy driver support
...
JIRA: TM-127
- Adding ioctl commands for setting PCIE state and initialize PCIE EP PLL;
- Sync some code from perforce;
DVS: http://ausdvs.nvidia.com/Build_Results?virtualId=1000859480
Signed-off-by: Koen Zhao <koenz@nvidia.com >
Change-Id: I4f9024f5037060a7c78f337148b202a078cbc4ba
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2461698
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
koenz
d711403132
misc: mods: synchronize with Perforce
...
Change-Id: Icfce1a3aa22d84cbd4825ab4fbce86970e2261f4
Signed-off-by: Koen Zhao <koenz@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2474042
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
32e7a1caab
misc: mods: fix ioctl for writing into sysfs files
...
f_op->write doesn't always have to exist, it can be NULL.
Instead, use kernel function which handles this correctly.
Change-Id: I955bc1c2e97d3bfee3e5c7e48fefcbda4af1214c
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2457926
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Anand Nahar <anahar@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
a51241efac
misc: mods: update MODS kernel driver to 4.1
...
Change-Id: I56377b85ff0909dba419c8e3f6df16c9302d6dc5
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2456573
Reviewed-by: svcguardwords <svcguardwords@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
125e88df0a
misc: mods: update MODS kernel driver to 3.99
...
Change-Id: I7ca22718af4e4f897ec0d410949fa1c14022eec1
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2422786
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Petlozu Pravareshwar
7d821e9865
misc: mods: Fix compilation issue with K5.9
...
Use 'pci_channel_state_t' instead of 'enum pci_channel_state'.
This is to fix compilation issue with K5.9.
Bug 200622929
Change-Id: I5587d9913d0a053de9066fed4ab183f1e5f3ac93
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2417901
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shabbirali Palasaniya <spalasaniya@nvidia.com >
Reviewed-by: Ellis Roberts <ellisr@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
root
12952ac5dc
Fix synchronization issue in mods kernel driver
...
Summary: The get_reset_handle function does not
release the spin_lock when it finds the handle in
the list of reset handles and returns. Modify the
function to ensure releasing of the lock in all
cases.
Change-Id: I2ead6d64199cccc7afb7876ca14ce91a110f7e6c
Signed-off-by: Ellis Roberts <ellisr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2365950
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
dongqiang
9e88fe9bb3
Update dma attrs for kernel 5.9 build
...
Bug 200622929
Change-Id: Ib4642122ebc09f5d2330d523ebab18c57cbdd892
Signed-off-by: Dong Qiang <carld@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2343983
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: Puneet Saxena <puneets@nvidia.com >
Reviewed-by: Richard Wiley <rwiley@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Bitan Biswas
22f3563ea5
nvidia: drivers: fix linux-5.7-rc5 build
...
Fix build linux-5.7-rc5 errors including following:
- change timespec to timespec64. replace getnstimeofday
with ktime_get_ts64
- replace usage of macro FIELD_SIZEOF with sizeof_field in ethtool.c
nvethernet and eqos files.
- support 2 arguments for of_get_phy_mode call
bug 200617764
Change-Id: I46067d7d36d08ee9556b2722e9ccec707b8853d4
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2347244
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
ellisr
ad434b8d0e
misc: mods: Update reset framework in mods driver
...
Summary: Previously mods stored handles for both
clocks and resets in the same list. This meant
reset signals that didn't have a corresponding
clock signal could not be toggled. This change
adds a separate list of structures to handle
resets and decouple it from the clock handling.
Change-Id: I2a83dd5cb7b7fe412acf7ae1815b18b747ad2cac
Signed-off-by: Ellis Roberts <ellisr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2225415
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
34b61af05b
misc: mods: update MODS driver from Perforce
...
Change-Id: I46f5d639a06dbd26b89103cfa82aecc047fd2ccc
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2317597
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
fa93fef9fb
update mods.h with public header guidelines
...
In git, we have moved this header to uapi directory, so that it can be
installed with the headers_install target. It now has to follow
guidelines of well-formed headers usable in userspace programs.
* Update SPDX license header.
* Don't use kernel CONFIG options.
Bug 2657961
Change-Id: Iee2bbfc6c931b5e8c5ee71cef9dfdfbb7f50d114
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2310801
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 >
2023-04-03 13:27:52 +00:00
Dong Qiang
949b226f0e
Smmu Support for MODS kernel module
...
Bug 200582229
This change will add smmu mapping/unmapping support for MODS
allocated memory buffer by using kernel smmu api dma_map_sg_attrs()
and dma_unmap_sg_attrs()
1. new IOCTL MODS_ESC_IOMMU_DMA_MAP_MEMORY and
MODS_ESC_IOMMU_DMA_UNMAP_MEMORY is added to do smmu mapping/unmapping
and get smmu mapped address for MODS allocated buffers;
2. a platform device and driver is added to match mods smmu sid in dtb,
the device is used to do smmu mapping/unampping; and mods smmu devices
are added in dtb to match with the driver with smmu config
Signed-off-by: Dong Qiang <carld@nvidia.com >
Change-Id: I47d4d1c43f14fc6b51f0c00cee127e1d51377f64
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2180897
Reviewed-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2023-04-03 13:27:52 +00:00
Chris Dragan
6a9401f3a1
misc: mods: move mods.h to uapi
...
Bug 2657961
Change-Id: I65f4a8ff48c534144afc5aca7ce556dcc82d9342
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2307271
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
14ecbcb3d5
misc: mods: update MODS driver from Perforce
...
Change-Id: I5a024a62688fa6ec1f445628bbc618ae92db737d
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2303203
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
a85680cbc5
misc: mods: fix compilation with k5.4
...
Clean up configuration in mods_config.h and make mods_config.h identical
to the official copy in Perforce.
Bug 200587200
Change-Id: I035119eb44025f45d8272729ebc5a918dd8da6fe
Signed-off-by: Chris Dragan <kdragan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2302436
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-03 13:27:52 +00:00
Chris Dragan
b5b2def304
misc: mods: improve logging and fix SRIOV
...
* 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 >
2023-04-03 13:27:52 +00:00