diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-06-14 07:50:15 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-19 13:43:10 -0400 |
commit | 52f1ab0372af3907364dea8b9ff3d25eaa4cbd7f (patch) | |
tree | febfcc9988dd74e02b4eca5f2d6685cafe41556d /drivers/gpu/nvgpu/os/linux/os_sched.c | |
parent | 3a9d8aebd6c8f982c9df1dd47a823b8b95483e90 (diff) |
gpu: nvgpu: add API to print process name
Add an OS-abstracted API for printing the name of the current process
into a log message and convert the single occurrence of current->comm in
submit path power failure to use it.
Jira NVGPU-705
Change-Id: I1a509dcc5aecc3c89ce4582733888081b3e38f1f
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1749833
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/os_sched.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/os_sched.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/os_sched.c b/drivers/gpu/nvgpu/os/linux/os_sched.c index 586b35eb..9a25da18 100644 --- a/drivers/gpu/nvgpu/os/linux/os_sched.c +++ b/drivers/gpu/nvgpu/os/linux/os_sched.c | |||
@@ -24,3 +24,9 @@ int nvgpu_current_pid(struct gk20a *g) | |||
24 | { | 24 | { |
25 | return current->tgid; | 25 | return current->tgid; |
26 | } | 26 | } |
27 | |||
28 | void __nvgpu_print_current(struct gk20a *g, const char *func_name, int line, | ||
29 | void *ctx, enum nvgpu_log_type type) | ||
30 | { | ||
31 | __nvgpu_log_msg(g, func_name, line, type, current->comm); | ||
32 | } | ||