Lines Matching refs:vd

107 	struct vector_desc_t *vd = vector_desc_head;  in insert_vector_desc()  local
110 while (vd != NULL) { in insert_vector_desc()
111 if (vd->cpu > to_insert->cpu) { in insert_vector_desc()
114 if (vd->cpu == to_insert->cpu && vd->intno >= to_insert->intno) { in insert_vector_desc()
117 prev = vd; in insert_vector_desc()
118 vd = vd->next; in insert_vector_desc()
122 to_insert->next = vd; in insert_vector_desc()
126 to_insert->next = vd; in insert_vector_desc()
133 struct vector_desc_t *vd = vector_desc_head; in find_desc_for_int() local
135 while (vd != NULL) { in find_desc_for_int()
136 if (vd->cpu == cpu && vd->intno == intno) { in find_desc_for_int()
139 vd = vd->next; in find_desc_for_int()
141 return vd; in find_desc_for_int()
151 struct vector_desc_t *vd = find_desc_for_int(intno, cpu); in get_desc_for_int() local
153 if (vd == NULL) { in get_desc_for_int()
165 return vd; in get_desc_for_int()
175 struct vector_desc_t *vd = vector_desc_head; in find_desc_for_source() local
177 while (vd != NULL) { in find_desc_for_source()
178 if (!(vd->flags & VECDESC_FL_SHARED)) { in find_desc_for_source()
179 if (vd->source == source && cpu == vd->cpu) { in find_desc_for_source()
182 } else if (vd->cpu == cpu) { in find_desc_for_source()
185 struct shared_vector_desc_t *svd = vd->shared_vec_info; in find_desc_for_source()
199 vd = vd->next; in find_desc_for_source()
201 return vd; in find_desc_for_source()
224 struct vector_desc_t *vd = get_desc_for_int(intno, cpu); in esp_intr_mark_shared() local
226 if (vd == NULL) { in esp_intr_mark_shared()
230 vd->flags = VECDESC_FL_SHARED; in esp_intr_mark_shared()
232 vd->flags |= VECDESC_FL_INIRAM; in esp_intr_mark_shared()
249 struct vector_desc_t *vd = get_desc_for_int(intno, cpu); in esp_intr_reserve() local
251 if (vd == NULL) { in esp_intr_reserve()
255 vd->flags = VECDESC_FL_RESERVED; in esp_intr_reserve()
271 static bool is_vect_desc_usable(struct vector_desc_t *vd, int flags, int cpu, int force) in is_vect_desc_usable() argument
274 int x = vd->intno; in is_vect_desc_usable()
303 if (vd->flags & VECDESC_FL_RESERVED) { in is_vect_desc_usable()
309 assert(!((vd->flags & VECDESC_FL_SHARED) && (vd->flags & VECDESC_FL_NONSHARED))); in is_vect_desc_usable()
311 if (vd->flags & VECDESC_FL_NONSHARED) { in is_vect_desc_usable()
316 if (vd->flags & VECDESC_FL_SHARED) { in is_vect_desc_usable()
319 bool desc_in_iram_flag = ((vd->flags & VECDESC_FL_INIRAM) != 0); in is_vect_desc_usable()
324 if ((vd->flags & VECDESC_FL_SHARED) && in is_vect_desc_usable()
368 struct vector_desc_t *vd = find_desc_for_source(source, cpu); in get_available_int() local
370 if (vd) { in get_available_int()
372 INTC_LOG("%s: existing vd found. intno: %d", __func__, vd->intno); in get_available_int()
373 if (force != -1 && force != vd->intno) { in get_available_int()
375 "existing intno: %d, force: %d", __func__, vd->intno, force); in get_available_int()
376 } else if (!is_vect_desc_usable(vd, flags, cpu, force)) { in get_available_int()
379 best = vd->intno; in get_available_int()
387 vd = find_desc_for_int(force, cpu); in get_available_int()
388 if (vd == NULL) { in get_available_int()
391 vd = &empty_vect_desc; in get_available_int()
393 if (is_vect_desc_usable(vd, flags, cpu, force)) { in get_available_int()
394 best = vd->intno; in get_available_int()
405 vd = find_desc_for_int(x, cpu); in get_available_int()
406 if (vd == NULL) { in get_available_int()
408 vd = &empty_vect_desc; in get_available_int()
421 if (!is_vect_desc_usable(vd, flags, cpu, force)) { in get_available_int()
429 if (vd->flags & VECDESC_FL_SHARED) { in get_available_int()
435 struct shared_vector_desc_t *svdesc = vd->shared_vec_info; in get_available_int()
497 struct vector_desc_t *vd = (struct vector_desc_t *)arg; in shared_intr_isr() local
498 struct shared_vector_desc_t *sh_vec = vd->shared_vec_info; in shared_intr_isr()
611 struct vector_desc_t *vd = get_desc_for_int(intr, cpu); in esp_intr_alloc_intrstatus() local
613 if (vd == NULL) { in esp_intr_alloc_intrstatus()
634 sv->next = vd->shared_vec_info; in esp_intr_alloc_intrstatus()
637 vd->shared_vec_info = sv; in esp_intr_alloc_intrstatus()
638 vd->flags |= VECDESC_FL_SHARED; in esp_intr_alloc_intrstatus()
640 set_interrupt_handler(intr, shared_intr_isr, vd); in esp_intr_alloc_intrstatus()
643 vd->flags = VECDESC_FL_NONSHARED; in esp_intr_alloc_intrstatus()
650 vd->source = source; in esp_intr_alloc_intrstatus()
653 vd->flags |= VECDESC_FL_INIRAM; in esp_intr_alloc_intrstatus()
656 vd->flags &= ~VECDESC_FL_INIRAM; in esp_intr_alloc_intrstatus()
664 ret->vector_desc = vd; in esp_intr_alloc_intrstatus()
665 ret->shared_vector_desc = vd->shared_vec_info; in esp_intr_alloc_intrstatus()
723 struct vector_desc_t *vd = handle->vector_desc; in esp_intr_set_in_iram() local
725 if (vd->flags & VECDESC_FL_SHARED) { in esp_intr_set_in_iram()
729 uint32_t mask = (1 << vd->intno); in esp_intr_set_in_iram()
732 vd->flags |= VECDESC_FL_INIRAM; in esp_intr_set_in_iram()
733 non_iram_int_mask[vd->cpu] &= ~mask; in esp_intr_set_in_iram()
735 vd->flags &= ~VECDESC_FL_INIRAM; in esp_intr_set_in_iram()
736 non_iram_int_mask[vd->cpu] |= mask; in esp_intr_set_in_iram()