Alex Waterman
9edd68ac52
nvgpu: gpu: posix: Fix order of memset() after malloc()
...
A memset was being done right before checking the malloc'ed pointer
for NULL. This completely ruins the purpose of the NULL check!
Change-Id: I3d6bc000f20054b5ff18d1171e51b227628ccf7c
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2096466
Reviewed-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-04-16 14:14:36 -07:00
Sagar Kadamati
8bd73246f3
nvgpu: unify sched unit with qnx
...
move sched funcs from nvgpu.c to os_sched.c, so qnx can use it
JIRA NVGPU-2134
Change-Id: I1a1a0773d3ff9a3e9a76ae7b730ec8d1b700ea14
Signed-off-by: Sagar Kadamati <skadamati@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2083808
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-04-02 12:55:40 -07:00
Shashank Singh
1c4ca22e62
gpu: nvgpu: posix: implement posix cond APIs
...
- Implement posix cond APIs as it is required
when adding cond API calls in mc.c, it will
be anyway useful in future as well for unit
tests requiring posix cond APIs.
Jira NVGPU-1396
Change-Id: I71dd63b58507d099ac535a946f8c7f14c739aaa0
Signed-off-by: Shashank Singh <shashsingh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1982652
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2019-01-10 22:54:49 -08:00
Nicolas Benech
5677666a3f
gpu: nvgpu: unit: Zero-out gk20a struct
...
The gk20a struct was not zero'ed out which could cause some
unexpected crashes, especially when NVGPU code is checking if
a function pointer is not NULL to decide to run the corresponding
function.
JIRA NVGPU-1246
Change-Id: I1a32c871fce59d6bf4729187af1b670c763a631a
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1946761
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2018-11-12 15:46:40 -08:00
Alex Waterman
7dee2d41b7
gpu: nvgpu: posix: Init enabled flags in nvgpu_posix_probe()
...
Also clean up the code a bit to be more MISRA friendly. Although
this isn't necessary it does help reduce false positives in the
various scans.
JIRA NVGPU-1323
Change-Id: I89a857ff69cc7669990bff942011ef1e11500327
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1941536
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com >
Reviewed-by: Scott Long <scottl@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Philip Elcan <pelcan@nvidia.com >
Reviewed-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2018-11-05 14:35:49 -08:00
Konsta Holtta
4453788314
gpu: nvgpu: posix: init the log mask to 0
...
Many functions do some logging which we may not need in unit tests.
Clear the log mask during probe to avoid unexpected behaviour; tests can
override this if needed.
Change-Id: Id36268cfb054a6887cdc5fe416b92481a6960433
Signed-off-by: Konsta Holtta <kholtta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1934471
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2018-10-25 11:13:45 -07:00
Konsta Holtta
e78d52ad1e
gpu: nvgpu: posix: free also os struct on cleanup
...
Free the allocated nvgpu_os_posix structure when cleaning up posix os
resources as the last step.
Change-Id: Ifcc22612ead5dac6e22b8f8b6e4731785a9eabf7
Signed-off-by: Konsta Holtta <kholtta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1916643
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2018-10-12 17:35:08 +05:30
Debarshi Dutta
7e1dbd8303
gpu: nvgpu: move header location of gk20a.h
...
1) Update header path of gk20a.h files present in os/
to <nvgpu/gk20a.h>
2) os_fence_android_sema.c indirectly was dependent on gk20a.h via
semaphore.h. So, added #include <nvgpu/gk20a.h> in
os_fence_android_sema.c and replaced the header with forward
declaration of struct gk20a in semaphore.h
Jira NVGPU-597
Change-Id: I96e23befeb80713f3a399071eb5498f6f580211d
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1842868
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2018-09-25 13:10:19 -07:00
Alex Waterman
b15624b39b
gpu: nvgpu: posix: move the posix dir to os
...
Since the posix code is supporting a particular OS this code
should belong under os/ not common/.
Change-Id: Idf5f75b8ab9d614c9dd43ea23dab8df3c346c0ef
Signed-off-by: Alex Waterman <alexw@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/1800658
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2018-08-17 13:54:25 -07:00