Konsta Hölttä
ae166bba8a
gpu: nvgpu: posix: print WARN*() location
...
WARN() and WARN_ON() are most useful when the log explains where they
happened. The posix implementation of these prints neither that nor the
warning message (if any). Extend the macros to include function name and
line number, and print those plus the format string.
Actually formatting the format string is problematic wrt. MISRA rules,
so the arguments are not formatted.
The implementation of BUG() already prints the function name and line
number.
Change-Id: Ie246a915f5e8420e1c606bb1555a7f9b498725fd
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2634105
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: Alex Waterman <alexw@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2021-12-11 14:05:16 -08:00
ajesh
b15bd97c08
gpu: nvgpu: fix misra violation in bug unit
...
Modify the callback interface from bug to quiesce unit to remove
a possible cyclic dependency in the bug unit. Make the list of
callbacks from bug unit, UT specific. The quiesce callback function
and argument are kept in separate variables, and in a normal run the
only callback that bug unit would invoke will be the quiesce specific
function. These changes will fix the violation of Rule 17.2 in bug unit.
JIRA NVGPU-6537
Change-Id: Icb6bc92077f8d26c87425768b09a7194a98e015d
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2527207
(cherry picked from commit 7696565648c5dd573a03be19ba9525856b781ea6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2530900
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com >
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2021-05-18 18:20:18 -07:00
ajesh
eac3137c60
gpu: nvgpu: add more tests for bug
...
Add more tests as part of Bug UT.
Jira NVGPU-4478
Change-Id: If9141ded41e9b9e97d03fa26c7404b85fa253014
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284669
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Alex Waterman <alexw@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:13:28 -06:00
ajesh
97718da708
gpu: nvgpu: add test for bug unit
...
Add a new test for warn message functionality as part of bug UT.
Jira NVGPU-4478
Change-Id: I2a250e4f6dc6946027e995ec3f340bb113c60f58
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2281019
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sagar Kamble <skamble@nvidia.com >
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
ajesh
e7f55f668d
gpu: nvgpu: unit: swuts: add posix bug
...
Add posix bug unit to SWUTS.
Jira NVGPU-4478
Change-Id: I37fb087952414d1083b268ad2bbf38def40ef189
Signed-off-by: ajesh <akv@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280348
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Thomas Fleury
1a3c1ee984
gpu: nvgpu: unit: add test for BUG() callbacks
...
Add unit tests for the following functions:
- nvgpu_bug_register_cb
- nvgpu_bug_unregister_cb
Jira NVGPU-4512
Change-Id: I21a4bd55cfff080373b6234e517c1ee9cb51cb8a
Signed-off-by: Thomas Fleury <tfleury@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2266392
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Shashank Singh <shashsingh@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2020-12-15 14:10:29 -06:00
Nicolas Benech
ce3facb616
gpu: nvgpu: unit: add posix-bug unit
...
The EXPECT_BUG construct was broken so this new unit will ensure
it does not happen again. It will also indirectly ensure that
BUG() works as intended.
JIRA NVGPU-3562
Change-Id: I09a11d616f37f8689e6f7c86840133410c5eb04e
Signed-off-by: Nicolas Benech <nbenech@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2126873
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 >
2019-06-05 13:35:13 -07:00