diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-03-14 20:29:06 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-16 14:03:59 -0400 |
commit | 886016190c804743da83f9e0db3366fef9720d0a (patch) | |
tree | ba5c3c1a2418ffef33e301a0013234f69783e3b1 /drivers | |
parent | 7fd72e313501c5fca0a161ed768247434233e60c (diff) |
gpu: nvgpu: Fix timers failure address
In the timers code a macro was using __builtin_return_address(0)
when it should have been using _THIS_IP_.
__builtin_return_address(0) will cause the timers code to print
the return address of the function that calls the timers code. This
isn't actually useful, of course. A user actually cares about where
the timers code call comes from which is easily obtained with
_THIS_IP_.
Bug 1799159
Change-Id: Iac16bc79e89e4cd18133db3d20f5a50d4d5e8f31
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1320839
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/timers.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/timers.h b/drivers/gpu/nvgpu/include/nvgpu/timers.h index 0ecbc183..abf8b736 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/timers.h +++ b/drivers/gpu/nvgpu/include/nvgpu/timers.h | |||
@@ -77,13 +77,11 @@ int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout, | |||
77 | int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout); | 77 | int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout); |
78 | 78 | ||
79 | #define nvgpu_timeout_expired(__timeout) \ | 79 | #define nvgpu_timeout_expired(__timeout) \ |
80 | __nvgpu_timeout_expired_msg(__timeout, \ | 80 | __nvgpu_timeout_expired_msg(__timeout, (void *)_THIS_IP_, "") |
81 | __builtin_return_address(0), "") | ||
82 | 81 | ||
83 | #define nvgpu_timeout_expired_msg(__timeout, fmt, args...) \ | 82 | #define nvgpu_timeout_expired_msg(__timeout, fmt, args...) \ |
84 | __nvgpu_timeout_expired_msg(__timeout, \ | 83 | __nvgpu_timeout_expired_msg(__timeout, (void *)_THIS_IP_, \ |
85 | __builtin_return_address(0), \ | 84 | fmt, ##args) |
86 | fmt, ##args) | ||
87 | 85 | ||
88 | /* | 86 | /* |
89 | * Don't use this directly. | 87 | * Don't use this directly. |