@@ -222,9 +222,9 @@ static struct aca_bank_error *new_bank_error(struct aca_error *aerr, struct aca_
222222 INIT_LIST_HEAD (& bank_error -> node );
223223 memcpy (& bank_error -> info , info , sizeof (* info ));
224224
225- mutex_lock (& aerr -> lock );
225+ spin_lock (& aerr -> lock );
226226 list_add_tail (& bank_error -> node , & aerr -> list );
227- mutex_unlock (& aerr -> lock );
227+ spin_unlock (& aerr -> lock );
228228
229229 return bank_error ;
230230}
@@ -235,7 +235,7 @@ static struct aca_bank_error *find_bank_error(struct aca_error *aerr, struct aca
235235 struct aca_bank_info * tmp_info ;
236236 bool found = false;
237237
238- mutex_lock (& aerr -> lock );
238+ spin_lock (& aerr -> lock );
239239 list_for_each_entry (bank_error , & aerr -> list , node ) {
240240 tmp_info = & bank_error -> info ;
241241 if (tmp_info -> socket_id == info -> socket_id &&
@@ -246,7 +246,7 @@ static struct aca_bank_error *find_bank_error(struct aca_error *aerr, struct aca
246246 }
247247
248248out_unlock :
249- mutex_unlock (& aerr -> lock );
249+ spin_unlock (& aerr -> lock );
250250
251251 return found ? bank_error : NULL ;
252252}
@@ -474,7 +474,7 @@ static int aca_log_aca_error(struct aca_handle *handle, enum aca_error_type type
474474 struct aca_error * aerr = & error_cache -> errors [type ];
475475 struct aca_bank_error * bank_error , * tmp ;
476476
477- mutex_lock (& aerr -> lock );
477+ spin_lock (& aerr -> lock );
478478
479479 if (list_empty (& aerr -> list ))
480480 goto out_unlock ;
@@ -485,7 +485,7 @@ static int aca_log_aca_error(struct aca_handle *handle, enum aca_error_type type
485485 }
486486
487487out_unlock :
488- mutex_unlock (& aerr -> lock );
488+ spin_unlock (& aerr -> lock );
489489
490490 return 0 ;
491491}
@@ -542,7 +542,7 @@ int amdgpu_aca_get_error_data(struct amdgpu_device *adev, struct aca_handle *han
542542
543543static void aca_error_init (struct aca_error * aerr , enum aca_error_type type )
544544{
545- mutex_init (& aerr -> lock );
545+ spin_lock_init (& aerr -> lock );
546546 INIT_LIST_HEAD (& aerr -> list );
547547 aerr -> type = type ;
548548 aerr -> nr_errors = 0 ;
@@ -561,11 +561,10 @@ static void aca_error_fini(struct aca_error *aerr)
561561{
562562 struct aca_bank_error * bank_error , * tmp ;
563563
564- mutex_lock (& aerr -> lock );
564+ spin_lock (& aerr -> lock );
565565 list_for_each_entry_safe (bank_error , tmp , & aerr -> list , node )
566566 aca_bank_error_remove (aerr , bank_error );
567-
568- mutex_destroy (& aerr -> lock );
567+ spin_unlock (& aerr -> lock );
569568}
570569
571570static void aca_fini_error_cache (struct aca_handle * handle )
0 commit comments