Lines Matching full:vector

28 	unsigned int		vector;  member
128 static void apic_update_irq_cfg(struct irq_data *irqd, unsigned int vector, in apic_update_irq_cfg() argument
135 apicd->hw_irq_cfg.vector = vector; in apic_update_irq_cfg()
138 trace_vector_config(irqd->irq, vector, cpu, in apic_update_irq_cfg()
151 trace_vector_update(irqd->irq, newvec, newcpu, apicd->vector, in apic_update_vector()
155 * If there is no vector associated or if the associated vector is in apic_update_vector()
156 * the shutdown vector, which is associated to make PCI/MSI in apic_update_vector()
161 if (!apicd->vector || apicd->vector == MANAGED_IRQ_SHUTDOWN_VECTOR) in apic_update_vector()
164 * If the target CPU of the previous vector is online, then mark in apic_update_vector()
165 * the vector as move in progress and store it for cleanup when the in apic_update_vector()
166 * first interrupt on the new vector arrives. If the target CPU is in apic_update_vector()
168 * vector is not possible and the vector can be immediately freed in apic_update_vector()
173 apicd->prev_vector = apicd->vector; in apic_update_vector()
177 irq_matrix_free(vector_matrix, apicd->cpu, apicd->vector, in apic_update_vector()
182 apicd->vector = newvec; in apic_update_vector()
238 int vector = apicd->vector; in assign_vector_locked() local
247 if (vector && cpu_online(cpu) && cpumask_test_cpu(cpu, dest)) in assign_vector_locked()
252 * be enqueued for cleanup. Assigning a new vector would either in assign_vector_locked()
253 * leave a stale vector on some CPU around or in case of a pending in assign_vector_locked()
259 vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu); in assign_vector_locked()
260 trace_vector_alloc(irqd->irq, vector, resvd, vector); in assign_vector_locked()
261 if (vector < 0) in assign_vector_locked()
262 return vector; in assign_vector_locked()
263 apic_update_vector(irqd, vector, cpu); in assign_vector_locked()
264 apic_update_irq_cfg(irqd, vector, cpu); in assign_vector_locked()
317 * Make only a global reservation with no guarantee. A real vector in assign_irq_vector_policy()
328 int vector, cpu; in assign_managed_vector() local
333 if (apicd->vector && cpumask_test_cpu(apicd->cpu, vector_searchmask)) in assign_managed_vector()
335 vector = irq_matrix_alloc_managed(vector_matrix, vector_searchmask, in assign_managed_vector()
337 trace_vector_alloc_managed(irqd->irq, vector, vector); in assign_managed_vector()
338 if (vector < 0) in assign_managed_vector()
339 return vector; in assign_managed_vector()
340 apic_update_vector(irqd, vector, cpu); in assign_managed_vector()
341 apic_update_irq_cfg(irqd, vector, cpu); in assign_managed_vector()
349 unsigned int vector = apicd->vector; in clear_irq_vector() local
353 if (!vector) in clear_irq_vector()
356 trace_vector_clear(irqd->irq, vector, apicd->cpu, apicd->prev_vector, in clear_irq_vector()
359 per_cpu(vector_irq, apicd->cpu)[vector] = VECTOR_SHUTDOWN; in clear_irq_vector()
360 irq_matrix_free(vector_matrix, apicd->cpu, vector, managed); in clear_irq_vector()
361 apicd->vector = 0; in clear_irq_vector()
364 vector = apicd->prev_vector; in clear_irq_vector()
365 if (!vector) in clear_irq_vector()
368 per_cpu(vector_irq, apicd->prev_cpu)[vector] = VECTOR_SHUTDOWN; in clear_irq_vector()
369 irq_matrix_free(vector_matrix, apicd->prev_cpu, vector, managed); in clear_irq_vector()
424 pr_warn("irq %u: Affinity broken due to vector space exhaustion.\n", in activate_reserved()
445 * This should not happen. The vector reservation got buggered. Handle in activate_managed()
449 pr_err("Managed startup irq %u, no vector available\n", in activate_managed()
520 apicd->vector = ISA_IRQ_VECTOR(virq); in vector_configure_legacy()
525 * If the interrupt is activated, then it must stay at this vector in vector_configure_legacy()
530 apic_update_irq_cfg(irqd, apicd->vector, apicd->cpu); in vector_configure_legacy()
532 /* Release the vector */ in vector_configure_legacy()
589 * takes them over. They stay on the same vector. This is in x86_vector_alloc_irqs()
644 seq_printf(m, "%*sVector: %5u\n", ind, "", apicd.vector); in x86_vector_debug_show()
647 seq_printf(m, "%*sPrevious vector: %5u\n", ind, "", apicd.prev_vector); in x86_vector_debug_show()
690 * HPET and I/OAPIC cannot be parented in the vector domain in x86_vector_select()
770 unsigned int i, vector; in lapic_assign_system_vectors() local
772 for_each_set_bit(vector, system_vectors, NR_VECTORS) in lapic_assign_system_vectors()
773 irq_matrix_assign_system(vector_matrix, vector, false); in lapic_assign_system_vectors()
797 fn = irq_domain_alloc_named_fwnode("VECTOR"); in arch_early_irq_init()
807 * Allocate the vector matrix allocator data structure and limit the in arch_early_irq_init()
819 static struct irq_desc *__setup_vector_irq(int vector) in __setup_vector_irq() argument
821 int isairq = vector - ISA_IRQ_VECTOR(0); in __setup_vector_irq()
835 unsigned int vector; in lapic_online() local
839 /* Online the vector matrix array for this CPU */ in lapic_online()
851 for (vector = 0; vector < NR_VECTORS; vector++) in lapic_online()
852 this_cpu_write(vector_irq[vector], __setup_vector_irq(vector)); in lapic_online()
863 /* In case the vector cleanup timer has not expired */ in lapic_offline()
901 __apic_send_IPI(apicd->cpu, apicd->vector); in apic_retrigger_irq()
937 unsigned int vector = apicd->prev_vector; in free_moved_vector() local
951 trace_vector_free_moved(apicd->irq, cpu, vector, managed); in free_moved_vector()
952 irq_matrix_free(vector_matrix, cpu, vector, managed); in free_moved_vector()
953 per_cpu(vector_irq, cpu)[vector] = VECTOR_UNUSED; in free_moved_vector()
968 unsigned int vector = apicd->prev_vector; in __vector_cleanup() local
971 * Paranoia: Check if the vector that needs to be cleaned in __vector_cleanup()
973 * hardware issue if the vector arrived on the old target in __vector_cleanup()
982 if (check_irr && is_vector_pending(vector)) { in __vector_cleanup()
1023 * vector lock. in __vector_schedule_cleanup()
1027 * would be blocked on vector lock. Rearming it in the in __vector_schedule_cleanup()
1031 * because that's serialized via vector lock too. in __vector_schedule_cleanup()
1063 * vector on the old target CPU. A vector check is not required in irq_complete_move()
1064 * because an interrupt can never move from one vector to another in irq_complete_move()
1079 unsigned int vector; in irq_force_complete_move() local
1104 vector = apicd->prev_vector; in irq_force_complete_move()
1105 if (!vector || (apicd->cpu != cpu && apicd->prev_cpu != cpu)) in irq_force_complete_move()
1109 * This is tricky. If the cleanup of the old vector has not been in irq_force_complete_move()
1118 * the new vector. in irq_force_complete_move()
1120 * 2) The interrupt has fired on the new vector, but the cleanup IPIs in irq_force_complete_move()
1129 * the old vector. in irq_force_complete_move()
1132 * the old vector is cleaned up, we get a spurious interrupt in irq_force_complete_move()
1140 * old vector is not yet cleaned up when the interrupt fires. in irq_force_complete_move()
1152 * We print at least the irq number and the old vector number, in irq_force_complete_move()
1156 pr_warn("IRQ fixup: irq %d move in progress, old vector %d\n", in irq_force_complete_move()
1157 irqd->irq, vector); in irq_force_complete_move()