Hi David, On 30 March 2016 at 00:09, David Miller <da...@davemloft.net> wrote: > From: Ezequiel Garcia <ezequ...@vanguardiasur.com.ar> > Date: Mon, 28 Mar 2016 17:41:18 -0300 > >> +/* Polled functionality used by netconsole and others in non interrupt mode >> */ >> +static void mvneta_poll_controller(struct net_device *dev) >> +{ >> + struct mvneta_port *pp = netdev_priv(dev); >> + >> + on_each_cpu(mvneta_percpu_poll_controller, pp, false); >> +} > > This doesn't work. > > netpoll may be invoked from any context whatsoever, even hardware > interrupt handlers or contexts where cpu interrupts are disabled. > > smp_call_function() and thus on_each_cpu() may not be called with > disabled interrupts or from a hardware interrupt handler or from > a bottom half handler, all of which are valid situations where > netpoll may occur since printk's can occur anywhere.
Well, I hated the idea of using on_each_cpu here, but wasn't sure if there was a real reason that forbid it. Thanks a lot for the feedback. -- Ezequiel GarcĂa, VanguardiaSur www.vanguardiasur.com.ar