gpu: nvgpu: rename error notifier APIs

There was a name clash between the nvgpu_set_error_notifier*() APIs and
the SET_ERROR_NOTIFIER IOCTL. Therefore, the APIs were renamed from
nvgpu_set_error_notifier*() to nvgpu_set_err_notifier*(). This rename
was done to fix MISRA 5.x errors.

JIRA NVGPU-1633

Change-Id: I06af551a664b0706f106e853f1ea8733894f11bd
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2159813
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Adeel Raza
2019-07-23 15:11:09 -07:00
committed by mobile promotions
parent 93a74d6700
commit 59ac65d8d7
10 changed files with 24 additions and 24 deletions

View File

@@ -2236,7 +2236,7 @@ static bool nvgpu_channel_ctxsw_timeout_debug_dump_state(struct gk20a *g,
struct nvgpu_channel *ch) struct nvgpu_channel *ch)
{ {
bool verbose = false; bool verbose = false;
if (nvgpu_is_error_notifier_set(ch, if (nvgpu_is_err_notifier_set(ch,
NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT)) { NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT)) {
verbose = ch->ctxsw_timeout_debug_dump; verbose = ch->ctxsw_timeout_debug_dump;
} }

View File

@@ -567,7 +567,7 @@ static const struct gpu_ops vgpu_gp10b_ops = {
nvgpu_channel_suspend_all_serviceable_ch, nvgpu_channel_suspend_all_serviceable_ch,
.resume_all_serviceable_ch = .resume_all_serviceable_ch =
nvgpu_channel_resume_all_serviceable_ch, nvgpu_channel_resume_all_serviceable_ch,
.set_error_notifier = nvgpu_set_error_notifier, .set_error_notifier = nvgpu_set_err_notifier,
.debug_dump = NULL, .debug_dump = NULL,
}, },
.tsg = { .tsg = {

View File

@@ -654,7 +654,7 @@ static const struct gpu_ops vgpu_gv11b_ops = {
nvgpu_channel_suspend_all_serviceable_ch, nvgpu_channel_suspend_all_serviceable_ch,
.resume_all_serviceable_ch = .resume_all_serviceable_ch =
nvgpu_channel_resume_all_serviceable_ch, nvgpu_channel_resume_all_serviceable_ch,
.set_error_notifier = nvgpu_set_error_notifier, .set_error_notifier = nvgpu_set_err_notifier,
.debug_dump = NULL, .debug_dump = NULL,
}, },
.tsg = { .tsg = {

View File

@@ -760,7 +760,7 @@ static const struct gpu_ops gm20b_ops = {
nvgpu_channel_suspend_all_serviceable_ch, nvgpu_channel_suspend_all_serviceable_ch,
.resume_all_serviceable_ch = .resume_all_serviceable_ch =
nvgpu_channel_resume_all_serviceable_ch, nvgpu_channel_resume_all_serviceable_ch,
.set_error_notifier = nvgpu_set_error_notifier, .set_error_notifier = nvgpu_set_err_notifier,
.debug_dump = gk20a_channel_debug_dump, .debug_dump = gk20a_channel_debug_dump,
}, },
.tsg = { .tsg = {

View File

@@ -846,7 +846,7 @@ static const struct gpu_ops gp10b_ops = {
nvgpu_channel_suspend_all_serviceable_ch, nvgpu_channel_suspend_all_serviceable_ch,
.resume_all_serviceable_ch = .resume_all_serviceable_ch =
nvgpu_channel_resume_all_serviceable_ch, nvgpu_channel_resume_all_serviceable_ch,
.set_error_notifier = nvgpu_set_error_notifier, .set_error_notifier = nvgpu_set_err_notifier,
.debug_dump = gk20a_channel_debug_dump, .debug_dump = gk20a_channel_debug_dump,
}, },
.tsg = { .tsg = {

View File

@@ -981,7 +981,7 @@ static const struct gpu_ops gv11b_ops = {
nvgpu_channel_suspend_all_serviceable_ch, nvgpu_channel_suspend_all_serviceable_ch,
.resume_all_serviceable_ch = .resume_all_serviceable_ch =
nvgpu_channel_resume_all_serviceable_ch, nvgpu_channel_resume_all_serviceable_ch,
.set_error_notifier = nvgpu_set_error_notifier_if_empty, .set_error_notifier = nvgpu_set_err_notifier_if_empty,
.reset_faulted = gv11b_channel_reset_faulted, .reset_faulted = gv11b_channel_reset_faulted,
.debug_dump = gv11b_channel_debug_dump, .debug_dump = gv11b_channel_debug_dump,
}, },

View File

@@ -1025,7 +1025,7 @@ static const struct gpu_ops tu104_ops = {
nvgpu_channel_suspend_all_serviceable_ch, nvgpu_channel_suspend_all_serviceable_ch,
.resume_all_serviceable_ch = .resume_all_serviceable_ch =
nvgpu_channel_resume_all_serviceable_ch, nvgpu_channel_resume_all_serviceable_ch,
.set_error_notifier = nvgpu_set_error_notifier_if_empty, .set_error_notifier = nvgpu_set_err_notifier_if_empty,
.reset_faulted = gv11b_channel_reset_faulted, .reset_faulted = gv11b_channel_reset_faulted,
.debug_dump = gv11b_channel_debug_dump, .debug_dump = gv11b_channel_debug_dump,
}, },

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@@ -41,9 +41,9 @@ enum {
NVGPU_ERR_NOTIFIER_PBDMA_PUSHBUFFER_CRC_MISMATCH, NVGPU_ERR_NOTIFIER_PBDMA_PUSHBUFFER_CRC_MISMATCH,
}; };
void nvgpu_set_error_notifier_locked(struct nvgpu_channel *ch, u32 error); void nvgpu_set_err_notifier_locked(struct nvgpu_channel *ch, u32 error);
void nvgpu_set_error_notifier(struct nvgpu_channel *ch, u32 error); void nvgpu_set_err_notifier(struct nvgpu_channel *ch, u32 error);
void nvgpu_set_error_notifier_if_empty(struct nvgpu_channel *ch, u32 error); void nvgpu_set_err_notifier_if_empty(struct nvgpu_channel *ch, u32 error);
bool nvgpu_is_error_notifier_set(struct nvgpu_channel *ch, u32 error_notifier); bool nvgpu_is_err_notifier_set(struct nvgpu_channel *ch, u32 error_notifier);
#endif /* NVGPU_ERROR_NOTIFIER_H */ #endif /* NVGPU_ERROR_NOTIFIER_H */

View File

@@ -108,12 +108,12 @@ static u32 nvgpu_error_notifier_to_channel_notifier(u32 error_notifier)
} }
/** /**
* nvgpu_set_error_notifier_locked() * nvgpu_set_err_notifier_locked()
* Should be called with ch->error_notifier_mutex held * Should be called with ch->error_notifier_mutex held
* *
* error should be of the form NVGPU_ERR_NOTIFIER_* * error should be of the form NVGPU_ERR_NOTIFIER_*
*/ */
void nvgpu_set_error_notifier_locked(struct nvgpu_channel *ch, u32 error) void nvgpu_set_err_notifier_locked(struct nvgpu_channel *ch, u32 error)
{ {
struct nvgpu_channel_linux *priv = ch->os_priv; struct nvgpu_channel_linux *priv = ch->os_priv;
@@ -141,16 +141,16 @@ void nvgpu_set_error_notifier_locked(struct nvgpu_channel *ch, u32 error)
} }
/* error should be of the form NVGPU_ERR_NOTIFIER_* */ /* error should be of the form NVGPU_ERR_NOTIFIER_* */
void nvgpu_set_error_notifier(struct nvgpu_channel *ch, u32 error) void nvgpu_set_err_notifier(struct nvgpu_channel *ch, u32 error)
{ {
struct nvgpu_channel_linux *priv = ch->os_priv; struct nvgpu_channel_linux *priv = ch->os_priv;
nvgpu_mutex_acquire(&priv->error_notifier.mutex); nvgpu_mutex_acquire(&priv->error_notifier.mutex);
nvgpu_set_error_notifier_locked(ch, error); nvgpu_set_err_notifier_locked(ch, error);
nvgpu_mutex_release(&priv->error_notifier.mutex); nvgpu_mutex_release(&priv->error_notifier.mutex);
} }
void nvgpu_set_error_notifier_if_empty(struct nvgpu_channel *ch, u32 error) void nvgpu_set_err_notifier_if_empty(struct nvgpu_channel *ch, u32 error)
{ {
struct nvgpu_channel_linux *priv = ch->os_priv; struct nvgpu_channel_linux *priv = ch->os_priv;
@@ -161,13 +161,13 @@ void nvgpu_set_error_notifier_if_empty(struct nvgpu_channel *ch, u32 error)
/* Don't overwrite error flag if it is already set */ /* Don't overwrite error flag if it is already set */
if (notification->status != 0xffff) if (notification->status != 0xffff)
nvgpu_set_error_notifier_locked(ch, error); nvgpu_set_err_notifier_locked(ch, error);
} }
nvgpu_mutex_release(&priv->error_notifier.mutex); nvgpu_mutex_release(&priv->error_notifier.mutex);
} }
/* error_notifier should be of the form NVGPU_ERR_NOTIFIER_* */ /* error_notifier should be of the form NVGPU_ERR_NOTIFIER_* */
bool nvgpu_is_error_notifier_set(struct nvgpu_channel *ch, u32 error_notifier) bool nvgpu_is_err_notifier_set(struct nvgpu_channel *ch, u32 error_notifier)
{ {
struct nvgpu_channel_linux *priv = ch->os_priv; struct nvgpu_channel_linux *priv = ch->os_priv;
bool notifier_set = false; bool notifier_set = false;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@@ -22,19 +22,19 @@
#include <nvgpu/error_notifier.h> #include <nvgpu/error_notifier.h>
void nvgpu_set_error_notifier_locked(struct nvgpu_channel *ch, u32 error) void nvgpu_set_err_notifier_locked(struct nvgpu_channel *ch, u32 error)
{ {
} }
void nvgpu_set_error_notifier(struct nvgpu_channel *ch, u32 error) void nvgpu_set_err_notifier(struct nvgpu_channel *ch, u32 error)
{ {
} }
void nvgpu_set_error_notifier_if_empty(struct nvgpu_channel *ch, u32 error) void nvgpu_set_err_notifier_if_empty(struct nvgpu_channel *ch, u32 error)
{ {
} }
bool nvgpu_is_error_notifier_set(struct nvgpu_channel *ch, u32 error_notifier) bool nvgpu_is_err_notifier_set(struct nvgpu_channel *ch, u32 error_notifier)
{ {
return false; return false;
} }