Nitin Kumbhar a232eb8d20 gpu: nvgpu: fix PRE31-C violations in wpr/vpr dump
nvgpu_err() macro with a nvgpu_readl() call results in
a volatile access. This violates PRE31-C rule - "Using an
unsafe function-like macro with side effect in argument
nvgpu_readl()" due to side effect of a volatile access.

Fix this by moving nvgpu_readl() calls before nvgpu_err().

The messages log VPR and WPR address info. There are no
known attacks using this info. So it shall be safe to
reveal address info.

JIRA NVGPU-3908

Change-Id: I487a0c0858fe9a36cc81852cedd7757aab277c6a
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2178416
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-08-21 04:50:08 -07:00
Description
No description provided
42 MiB