mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: use nvgpu list APIs instead of linux APIs
Use nvgpu specific list APIs nvgpu_list_for_each_entry() instead of calling Linux specific list APIs list_for_each_entry() Jira NVGPU-444 Change-Id: I3c1fd495ed9e8bebab1f23b6769944373b46059b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1612442 Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d4c51a7321
commit
6ec7da5eba
@@ -791,8 +791,8 @@ static int gk20a_channel_get_event_data_from_id(struct channel_gk20a *ch,
|
||||
bool event_found = false;
|
||||
|
||||
nvgpu_mutex_acquire(&ch->event_id_list_lock);
|
||||
list_for_each_entry(local_event_id_data, &ch->event_id_list,
|
||||
event_id_node) {
|
||||
nvgpu_list_for_each_entry(local_event_id_data, &ch->event_id_list,
|
||||
gk20a_event_id_data, event_id_node) {
|
||||
if (local_event_id_data->event_id == event_id) {
|
||||
event_found = true;
|
||||
break;
|
||||
|
||||
@@ -692,7 +692,8 @@ int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch,
|
||||
|
||||
nvgpu_rwsem_down_read(&tsg->ch_list_lock);
|
||||
|
||||
list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) {
|
||||
nvgpu_list_for_each_entry(ch_tsg, &tsg->ch_list,
|
||||
channel_gk20a, ch_entry) {
|
||||
if (gk20a_channel_get(ch_tsg)) {
|
||||
nvgpu_set_error_notifier(ch_tsg, err_code);
|
||||
ch_tsg->has_timedout = true;
|
||||
@@ -747,7 +748,8 @@ static void vgpu_fifo_set_ctx_mmu_error_ch_tsg(struct gk20a *g,
|
||||
|
||||
nvgpu_rwsem_down_read(&tsg->ch_list_lock);
|
||||
|
||||
list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) {
|
||||
nvgpu_list_for_each_entry(ch_tsg, &tsg->ch_list,
|
||||
channel_gk20a, ch_entry) {
|
||||
if (gk20a_channel_get(ch_tsg)) {
|
||||
vgpu_fifo_set_ctx_mmu_error_ch(g, ch_tsg);
|
||||
gk20a_channel_put(ch_tsg);
|
||||
|
||||
@@ -1132,7 +1132,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g,
|
||||
}
|
||||
|
||||
n = 0;
|
||||
list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry)
|
||||
nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list,
|
||||
dbg_session_channel_data, ch_entry)
|
||||
n++;
|
||||
|
||||
if (oob_size < n * sizeof(u16)) {
|
||||
@@ -1145,7 +1146,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g,
|
||||
p = &msg.params.suspend_contexts;
|
||||
p->num_channels = n;
|
||||
n = 0;
|
||||
list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry)
|
||||
nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list,
|
||||
dbg_session_channel_data, ch_entry)
|
||||
oob[n++] = (u16)ch_data->chid;
|
||||
|
||||
err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
|
||||
@@ -1155,7 +1157,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g,
|
||||
}
|
||||
|
||||
if (p->resident_chid != (u16)~0) {
|
||||
list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry) {
|
||||
nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list,
|
||||
dbg_session_channel_data, ch_entry) {
|
||||
if (ch_data->chid == p->resident_chid) {
|
||||
channel_fd = ch_data->channel_fd;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user