Re: [PATCH v4 5/5] irqchip: sifive-plic: Implement irq_set_affinity() for SMP host

2019-01-18 Thread Anup Patel
On Tue, Jan 15, 2019 at 9:27 PM Christoph Hellwig wrote: > > > + if (!force) > > + cpu = cpumask_any_and(mask_val, cpu_online_mask); > > + else > > + cpu = cpumask_first(mask_val); > > Any reason for the inverted test? Okay, I will not use inverted test here. > >

Re: [PATCH v4 5/5] irqchip: sifive-plic: Implement irq_set_affinity() for SMP host

2019-01-15 Thread Christoph Hellwig
> + if (!force) > + cpu = cpumask_any_and(mask_val, cpu_online_mask); > + else > + cpu = cpumask_first(mask_val); Any reason for the inverted test? Otherwise this looks fine to me: Reviewed-by: Christoph Hellwig

[PATCH v4 5/5] irqchip: sifive-plic: Implement irq_set_affinity() for SMP host

2018-12-27 Thread Anup Patel
Currently on SMP host, all CPUs take external interrupts routed via PLIC. All CPUs will try to claim a given external interrupt but only one of them will succeed while other CPUs would simply resume whatever they were doing before. This means if we have N CPUs then for every external interrupt N-1