1 #include <xen/irq.h>
2 #include <xen/errno.h>
3 
init_one_irq_desc(struct irq_desc * desc)4 int init_one_irq_desc(struct irq_desc *desc)
5 {
6     int err;
7 
8     if (irq_desc_initialized(desc))
9         return 0;
10 
11     if ( !alloc_cpumask_var(&desc->affinity) )
12         return -ENOMEM;
13 
14     desc->status = IRQ_DISABLED;
15     desc->handler = &no_irq_type;
16     spin_lock_init(&desc->lock);
17     cpumask_setall(desc->affinity);
18     INIT_LIST_HEAD(&desc->rl_link);
19 
20     err = arch_init_one_irq_desc(desc);
21     if ( err )
22     {
23         free_cpumask_var(desc->affinity);
24         desc->handler = NULL;
25     }
26 
27     return err;
28 }
29 
no_action(int cpl,void * dev_id,struct cpu_user_regs * regs)30 void no_action(int cpl, void *dev_id, struct cpu_user_regs *regs)
31 {
32 }
33 
irq_actor_none(struct irq_desc * desc)34 void irq_actor_none(struct irq_desc *desc)
35 {
36 }
37 
irq_startup_none(struct irq_desc * desc)38 unsigned int irq_startup_none(struct irq_desc *desc)
39 {
40     return 0;
41 }
42