Lines Matching full:banks
49 static void aca_banks_init(struct aca_banks *banks) in aca_banks_init() argument
51 if (!banks) in aca_banks_init()
54 memset(banks, 0, sizeof(*banks)); in aca_banks_init()
55 INIT_LIST_HEAD(&banks->list); in aca_banks_init()
58 static int aca_banks_add_bank(struct aca_banks *banks, struct aca_bank *bank) in aca_banks_add_bank() argument
72 list_add_tail(&node->node, &banks->list); in aca_banks_add_bank()
74 banks->nr_banks++; in aca_banks_add_bank()
79 static void aca_banks_release(struct aca_banks *banks) in aca_banks_release() argument
83 if (list_empty(&banks->list)) in aca_banks_release()
86 list_for_each_entry_safe(node, tmp, &banks->list, node) { in aca_banks_release()
137 struct aca_banks *banks, struct ras_query_context *qctx) in aca_smu_get_valid_aca_banks() argument
175 ret = aca_banks_add_bank(banks, &bank); in aca_smu_get_valid_aca_banks()
352 static int aca_dispatch_banks(struct aca_handle_manager *mgr, struct aca_banks *banks, in aca_dispatch_banks() argument
359 if (!mgr || !banks) in aca_dispatch_banks()
363 if (list_empty(&mgr->list) || list_empty(&banks->list)) in aca_dispatch_banks()
366 list_for_each_entry(node, &banks->list, node) { in aca_dispatch_banks()
401 struct aca_banks banks; in aca_banks_update() local
418 aca_banks_init(&banks); in aca_banks_update()
420 ret = aca_smu_get_valid_aca_banks(adev, type, 0, count, &banks, qctx); in aca_banks_update()
424 if (list_empty(&banks.list)) { in aca_banks_update()
429 ret = aca_dispatch_banks(&aca->mgr, &banks, type, in aca_banks_update()
435 aca_banks_release(&banks); in aca_banks_update()