[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1278817954.6139.24.camel@localhost>
Date: Sun, 11 Jul 2010 04:12:34 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: David Miller <davem@...emloft.net>
Cc: ken_kawasaki@...ing.nifty.jp, netdev@...r.kernel.org
Subject: Re: [PATCH kernel 2.6.35-rc3-git7] axnet_cs: use spin_lock_irqsave
in ax_interrupt
On Sat, 2010-07-10 at 19:49 -0700, David Miller wrote:
> From: Ben Hutchings <bhutchings@...arflare.com>
> Date: Sun, 11 Jul 2010 03:46:28 +0100
>
> > On Sat, 2010-07-10 at 20:18 +0900, Ken Kawasaki wrote:
> >> axnet_cs:
> >> use spin_lock_irqsave instead of spin_lock in ax_interrupt
> > [...]
> >
> > I assume this is because it's now called from ei_watchdog() and not only
> > from interrupt context. Perhaps you should explain that in the commit
> > message.
>
> No, interrupt handlers in general may not assume that interrupts
> are off or on when they are invoked.
>
> Therefore they must use irqflags saving/restoring.
But an interrupt handler will not be called recursively for the same
IRQ. Since this device only uses one IRQ, surely it was OK to use
spin_lock() in this function so long as it was only called from the
interrupt handler.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
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