On 20.05.22 16:29, Gunter Grau via Xenomai wrote: > From: Julian Haller <[email protected]> > > ipipe_set_irq_affinity directly returns the value of the regular > irq_set_affinity method. As described in irq.h in the linux kernel, > the following return values indicate a success: > > /* > * Return value for chip->irq_set_affinity() > * > * IRQ_SET_MASK_OK - OK, core updates irq_common_data.affinity > * IRQ_SET_MASK_NOCPY - OK, chip did update irq_common_data.affinity > * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to > * support stacked irqchips, which indicates skipping > * all descendent irqchips. > */ > enum { > IRQ_SET_MASK_OK = 0, > IRQ_SET_MASK_OK_NOCOPY, > IRQ_SET_MASK_OK_DONE, > }; > > As one example, the GIC in i.MX6 devices returns IRQ_SET_MASK_OK_DONE > on success. Fix the xintr_attach function by treating all positive > return values as success. > > Signed-off-by: Gunter Grau <[email protected]> > --- > kernel/cobalt/ipipe/intr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/cobalt/ipipe/intr.c b/kernel/cobalt/ipipe/intr.c > index 378c7f07d..cb15597f7 100644 > --- a/kernel/cobalt/ipipe/intr.c > +++ b/kernel/cobalt/ipipe/intr.c > @@ -869,7 +869,7 @@ int xnintr_attach(struct xnintr *intr, void *cookie, > const cpumask_t *cpumask) > return -EINVAL; > } > ret = ipipe_set_irq_affinity(intr->irq, *effective_mask); > - if (ret) > + if (ret < 0) > return ret; > #endif /* CONFIG_SMP */ >
Thanks, applied to the 3.2 stable tree. Other versions are not affected. Jan -- Siemens AG, Technology Competence Center Embedded Linux
