[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090417115011.5c3d17e1@hskinnemoen-d830>
Date: Fri, 17 Apr 2009 11:50:11 +0200
From: Haavard Skinnemoen <haavard.skinnemoen@...el.com>
To: David Miller <davem@...emloft.net>
Cc: thomas.petazzoni@...e-electrons.com, netdev@...r.kernel.org,
michael@...e-electrons.com
Subject: Re: [PATCH] macb: Add support of the netpoll API
David Miller wrote:
> From: Haavard Skinnemoen <haavard.skinnemoen@...el.com>
> Date: Fri, 17 Apr 2009 11:25:53 +0200
>
> > I guess you're right -- we just have to be careful about calling
> > printk() from within the driver. But it seems a lot easier to just drop
> > the lock before dumping an error message than it is to work around that
> > disable_irq() deadlock. And if you're running with verbose debugging
> > enabled, you probably shouldn't be using netconsole anyway.
>
> Therefore, do you agree to add Thomas's patch as-is?
No, therefore, I'd prefer local_irq_save() :-)
When using disable_irq(), there's no way we can call printk() from the
interrupt handler ever. When using local_irq_save() we can call
printk() from the interrupt handler provided that we drop the lock
first.
And since poll_controller() ends up taking the lock in both cases, we
need to be careful about calling printk() while holding the lock
anyway. So local_irq_save() means one less thing that might kill the
driver.
Haavard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists