Lines Matching refs:irq
93 int irq; in find_unassigned_irq() local
95 for (irq = IA64_FIRST_DEVICE_VECTOR; irq < NR_IRQS; irq++) in find_unassigned_irq()
96 if (irq_status[irq] == IRQ_UNUSED) in find_unassigned_irq()
97 return irq; in find_unassigned_irq()
120 static int __bind_irq_vector(int irq, int vector, cpumask_t domain) in __bind_irq_vector() argument
124 struct irq_cfg *cfg = &irq_cfg[irq]; in __bind_irq_vector()
126 BUG_ON((unsigned)irq >= NR_IRQS); in __bind_irq_vector()
137 per_cpu(vector_irq, cpu)[vector] = irq; in __bind_irq_vector()
140 irq_status[irq] = IRQ_USED; in __bind_irq_vector()
145 int bind_irq_vector(int irq, int vector, cpumask_t domain) in bind_irq_vector() argument
151 ret = __bind_irq_vector(irq, vector, domain); in bind_irq_vector()
156 static void __clear_irq_vector(int irq) in __clear_irq_vector() argument
160 struct irq_cfg *cfg = &irq_cfg[irq]; in __clear_irq_vector()
162 BUG_ON((unsigned)irq >= NR_IRQS); in __clear_irq_vector()
170 irq_status[irq] = IRQ_UNUSED; in __clear_irq_vector()
174 static void clear_irq_vector(int irq) in clear_irq_vector() argument
179 __clear_irq_vector(irq); in clear_irq_vector()
184 ia64_native_assign_irq_vector (int irq) in ia64_native_assign_irq_vector() argument
201 if (irq == AUTO_ASSIGN) in ia64_native_assign_irq_vector()
202 irq = vector; in ia64_native_assign_irq_vector()
203 BUG_ON(__bind_irq_vector(irq, vector, domain)); in ia64_native_assign_irq_vector()
233 int irq, vector; in __setup_vector_irq() local
239 for (irq = 0; irq < NR_IRQS; ++irq) { in __setup_vector_irq()
240 if (!cpumask_test_cpu(cpu, &irq_cfg[irq].domain)) in __setup_vector_irq()
242 vector = irq_to_vector(irq); in __setup_vector_irq()
243 per_cpu(vector_irq, cpu)[vector] = irq; in __setup_vector_irq()
261 static int __irq_prepare_move(int irq, int cpu) in __irq_prepare_move() argument
263 struct irq_cfg *cfg = &irq_cfg[irq]; in __irq_prepare_move()
281 BUG_ON(__bind_irq_vector(irq, vector, domain)); in __irq_prepare_move()
285 int irq_prepare_move(int irq, int cpu) in irq_prepare_move() argument
291 ret = __irq_prepare_move(irq, cpu); in irq_prepare_move()
296 void irq_complete_move(unsigned irq) in irq_complete_move() argument
298 struct irq_cfg *cfg = &irq_cfg[irq]; in irq_complete_move()
315 static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id) in smp_irq_move_cleanup_interrupt() argument
323 int irq; in smp_irq_move_cleanup_interrupt() local
326 irq = __this_cpu_read(vector_irq[vector]); in smp_irq_move_cleanup_interrupt()
327 if (irq < 0) in smp_irq_move_cleanup_interrupt()
330 desc = irq_to_desc(irq); in smp_irq_move_cleanup_interrupt()
331 cfg = irq_cfg + irq; in smp_irq_move_cleanup_interrupt()
369 void destroy_and_reserve_irq(unsigned int irq) in destroy_and_reserve_irq() argument
373 irq_init_desc(irq); in destroy_and_reserve_irq()
375 __clear_irq_vector(irq); in destroy_and_reserve_irq()
376 irq_status[irq] = IRQ_RSVD; in destroy_and_reserve_irq()
386 int irq, vector, cpu; in create_irq() local
389 irq = vector = -ENOSPC; in create_irq()
399 irq = find_unassigned_irq(); in create_irq()
400 if (irq < 0) in create_irq()
402 BUG_ON(__bind_irq_vector(irq, vector, domain)); in create_irq()
405 if (irq >= 0) in create_irq()
406 irq_init_desc(irq); in create_irq()
407 return irq; in create_irq()
410 void destroy_irq(unsigned int irq) in destroy_irq() argument
412 irq_init_desc(irq); in destroy_irq()
413 clear_irq_vector(irq); in destroy_irq()
469 int irq = local_vector_to_irq(vector); in ia64_handle_irq() local
473 kstat_incr_irq_this_cpu(irq); in ia64_handle_irq()
476 kstat_incr_irq_this_cpu(irq); in ia64_handle_irq()
481 if (unlikely(irq < 0)) { in ia64_handle_irq()
487 generic_handle_irq(irq); in ia64_handle_irq()
528 int irq = local_vector_to_irq(vector); in ia64_process_pending_intr() local
532 kstat_incr_irq_this_cpu(irq); in ia64_process_pending_intr()
534 kstat_incr_irq_this_cpu(irq); in ia64_process_pending_intr()
547 if (unlikely(irq < 0)) { in ia64_process_pending_intr()
553 vectors_in_migration[irq]=0; in ia64_process_pending_intr()
554 generic_handle_irq(irq); in ia64_process_pending_intr()
574 static irqreturn_t dummy_handler (int irq, void *dev_id) in dummy_handler() argument
590 unsigned int irq; in register_percpu_irq() local
592 irq = vec; in register_percpu_irq()
593 BUG_ON(bind_irq_vector(irq, vec, CPU_MASK_ALL)); in register_percpu_irq()
594 irq_set_status_flags(irq, IRQ_PER_CPU); in register_percpu_irq()
595 irq_set_chip(irq, &irq_type_ia64_lsapic); in register_percpu_irq()
597 if (request_irq(irq, handler, flags, name, NULL)) in register_percpu_irq()
598 pr_err("Failed to request irq %u (%s)\n", irq, name); in register_percpu_irq()
599 irq_set_handler(irq, handle_percpu_irq); in register_percpu_irq()