Lines Matching full:vector

28 	unsigned int		vector;  member
117 static void apic_update_irq_cfg(struct irq_data *irqd, unsigned int vector, in apic_update_irq_cfg() argument
124 apicd->hw_irq_cfg.vector = vector; in apic_update_irq_cfg()
127 trace_vector_config(irqd->irq, vector, cpu, in apic_update_irq_cfg()
140 trace_vector_update(irqd->irq, newvec, newcpu, apicd->vector, in apic_update_vector()
144 * If there is no vector associated or if the associated vector is in apic_update_vector()
145 * the shutdown vector, which is associated to make PCI/MSI in apic_update_vector()
150 if (!apicd->vector || apicd->vector == MANAGED_IRQ_SHUTDOWN_VECTOR) in apic_update_vector()
153 * If the target CPU of the previous vector is online, then mark in apic_update_vector()
154 * the vector as move in progress and store it for cleanup when the in apic_update_vector()
155 * first interrupt on the new vector arrives. If the target CPU is in apic_update_vector()
157 * vector is not possible and the vector can be immediately freed in apic_update_vector()
162 apicd->prev_vector = apicd->vector; in apic_update_vector()
166 irq_matrix_free(vector_matrix, apicd->cpu, apicd->vector, in apic_update_vector()
171 apicd->vector = newvec; in apic_update_vector()
227 int vector = apicd->vector; in assign_vector_locked() local
236 if (vector && cpu_online(cpu) && cpumask_test_cpu(cpu, dest)) in assign_vector_locked()
241 * be enqueued for cleanup. Assigning a new vector would either in assign_vector_locked()
242 * leave a stale vector on some CPU around or in case of a pending in assign_vector_locked()
248 vector = irq_matrix_alloc(vector_matrix, dest, resvd, &cpu); in assign_vector_locked()
249 trace_vector_alloc(irqd->irq, vector, resvd, vector); in assign_vector_locked()
250 if (vector < 0) in assign_vector_locked()
251 return vector; in assign_vector_locked()
252 apic_update_vector(irqd, vector, cpu); in assign_vector_locked()
253 apic_update_irq_cfg(irqd, vector, cpu); in assign_vector_locked()
306 * Make only a global reservation with no guarantee. A real vector in assign_irq_vector_policy()
317 int vector, cpu; in assign_managed_vector() local
322 if (apicd->vector && cpumask_test_cpu(apicd->cpu, vector_searchmask)) in assign_managed_vector()
324 vector = irq_matrix_alloc_managed(vector_matrix, vector_searchmask, in assign_managed_vector()
326 trace_vector_alloc_managed(irqd->irq, vector, vector); in assign_managed_vector()
327 if (vector < 0) in assign_managed_vector()
328 return vector; in assign_managed_vector()
329 apic_update_vector(irqd, vector, cpu); in assign_managed_vector()
330 apic_update_irq_cfg(irqd, vector, cpu); in assign_managed_vector()
338 unsigned int vector = apicd->vector; in clear_irq_vector() local
342 if (!vector) in clear_irq_vector()
345 trace_vector_clear(irqd->irq, vector, apicd->cpu, apicd->prev_vector, in clear_irq_vector()
348 per_cpu(vector_irq, apicd->cpu)[vector] = VECTOR_SHUTDOWN; in clear_irq_vector()
349 irq_matrix_free(vector_matrix, apicd->cpu, vector, managed); in clear_irq_vector()
350 apicd->vector = 0; in clear_irq_vector()
353 vector = apicd->prev_vector; in clear_irq_vector()
354 if (!vector) in clear_irq_vector()
357 per_cpu(vector_irq, apicd->prev_cpu)[vector] = VECTOR_SHUTDOWN; in clear_irq_vector()
358 irq_matrix_free(vector_matrix, apicd->prev_cpu, vector, managed); in clear_irq_vector()
413 pr_warn("irq %u: Affinity broken due to vector space exhaustion.\n", in activate_reserved()
434 * This should not happen. The vector reservation got buggered. Handle in activate_managed()
438 pr_err("Managed startup irq %u, no vector available\n", in activate_managed()
509 apicd->vector = ISA_IRQ_VECTOR(virq); in vector_configure_legacy()
514 * If the interrupt is activated, then it must stay at this vector in vector_configure_legacy()
519 apic_update_irq_cfg(irqd, apicd->vector, apicd->cpu); in vector_configure_legacy()
521 /* Release the vector */ in vector_configure_legacy()
542 /* Currently vector allocator can't guarantee contiguous allocations */ in x86_vector_alloc_irqs()
582 * takes them over. They stay on the same vector. This is in x86_vector_alloc_irqs()
637 seq_printf(m, "%*sVector: %5u\n", ind, "", apicd.vector); in x86_vector_debug_show()
640 seq_printf(m, "%*sPrevious vector: %5u\n", ind, "", apicd.prev_vector); in x86_vector_debug_show()
683 * HPET and I/OAPIC cannot be parented in the vector domain in x86_vector_select()
763 unsigned int i, vector; in lapic_assign_system_vectors() local
765 for_each_set_bit(vector, system_vectors, NR_VECTORS) in lapic_assign_system_vectors()
766 irq_matrix_assign_system(vector_matrix, vector, false); in lapic_assign_system_vectors()
790 fn = irq_domain_alloc_named_fwnode("VECTOR"); in arch_early_irq_init()
800 * Allocate the vector matrix allocator data structure and limit the in arch_early_irq_init()
812 static struct irq_desc *__setup_vector_irq(int vector) in __setup_vector_irq() argument
814 int isairq = vector - ISA_IRQ_VECTOR(0); in __setup_vector_irq()
828 unsigned int vector; in lapic_online() local
832 /* Online the vector matrix array for this CPU */ in lapic_online()
844 for (vector = 0; vector < NR_VECTORS; vector++) in lapic_online()
845 this_cpu_write(vector_irq[vector], __setup_vector_irq(vector)); in lapic_online()
883 apic->send_IPI(apicd->cpu, apicd->vector); in apic_retrigger_irq()
919 unsigned int vector = apicd->prev_vector; in free_moved_vector() local
933 trace_vector_free_moved(apicd->irq, cpu, vector, managed); in free_moved_vector()
934 irq_matrix_free(vector_matrix, cpu, vector, managed); in free_moved_vector()
935 per_cpu(vector_irq, cpu)[vector] = VECTOR_UNUSED; in free_moved_vector()
952 unsigned int irr, vector = apicd->prev_vector; in DEFINE_IDTENTRY_SYSVEC() local
955 * Paranoia: Check if the vector that needs to be cleaned in DEFINE_IDTENTRY_SYSVEC()
960 * priority external vector, so on return from this in DEFINE_IDTENTRY_SYSVEC()
963 irr = apic_read(APIC_IRR + (vector / 32 * 0x10)); in DEFINE_IDTENTRY_SYSVEC()
964 if (irr & (1U << (vector % 32))) { in DEFINE_IDTENTRY_SYSVEC()
1009 * vector on the old target CPU. A vector check is not required in irq_complete_move()
1010 * because an interrupt can never move from one vector to another in irq_complete_move()
1024 unsigned int vector; in irq_force_complete_move() local
1048 vector = apicd->prev_vector; in irq_force_complete_move()
1049 if (!vector) in irq_force_complete_move()
1053 * This is tricky. If the cleanup of the old vector has not been in irq_force_complete_move()
1062 * the new vector. in irq_force_complete_move()
1064 * 2) The interrupt has fired on the new vector, but the cleanup IPIs in irq_force_complete_move()
1073 * the old vector. in irq_force_complete_move()
1076 * the old vector is cleaned up, we get a spurious interrupt in irq_force_complete_move()
1084 * old vector is not yet cleaned up when the interrupt fires. in irq_force_complete_move()
1096 * We print at least the irq number and the old vector number, in irq_force_complete_move()
1100 pr_warn("IRQ fixup: irq %d move in progress, old vector %d\n", in irq_force_complete_move()
1101 irqd->irq, vector); in irq_force_complete_move()