void xnintr_affinity(xnintr_t *intr, xnarch_cpumask_t cpumask) { trace_mark(xn_nucleus, irq_affinity, "irq %u %lu", intr->irq, *(unsigned long *)&cpumask); xnarch_set_irq_affinity(intr->irq, cpumask); }
int xnintr_attach(xnintr_t *intr, void *cookie) { int err; spl_t s; intr->cookie = cookie; memset(&intr->stat, 0, sizeof(intr->stat)); xnlock_get_irqsave(&intrlock, s); #ifdef CONFIG_SMP xnarch_set_irq_affinity(intr->irq, nkaffinity); #endif /* CONFIG_SMP */ err = xnintr_irq_attach(intr); xnlock_put_irqrestore(&intrlock, s); return err; }
int xnintr_attach(xnintr_t *intr, void *cookie) { int ret; trace_mark(xn_nucleus, irq_attach, "irq %u name %s", intr->irq, intr->name); intr->cookie = cookie; memset(&intr->stat, 0, sizeof(intr->stat)); #ifdef CONFIG_SMP xnarch_set_irq_affinity(intr->irq, nkaffinity); #endif /* CONFIG_SMP */ down(&intrlock); if (__testbits(intr->flags, XN_ISR_ATTACHED)) { ret = -EBUSY; goto out; } ret = xnintr_irq_attach(intr); if (ret) goto out; __setbits(intr->flags, XN_ISR_ATTACHED); xnintr_stat_counter_inc(); out: up(&intrlock); return ret; }
int xnintr_attach(xnintr_t *intr, void *cookie) { int ret; spl_t s; trace_mark(xn_nucleus, irq_attach, "irq %u name %s", intr->irq, intr->name); intr->cookie = cookie; memset(&intr->stat, 0, sizeof(intr->stat)); #ifdef CONFIG_SMP xnarch_set_irq_affinity(intr->irq, nkaffinity); #endif /* CONFIG_SMP */ xnlock_get_irqsave(&intrlock, s); if (intr->irq >= XNARCH_NR_IRQS) { ret = -EINVAL; goto out; } if (__testbits(intr->flags, XN_ISR_ATTACHED)) { ret = -EBUSY; goto out; } ret = xnintr_irq_attach(intr); if (ret) goto out; __setbits(intr->flags, XN_ISR_ATTACHED); xnintr_stat_counter_inc(); out: xnlock_put_irqrestore(&intrlock, s); return ret; }