From: "Hans J. Koch" <hjk@hansjkoch.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Chris Wright <chrisw@redhat.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Anthony Foiani <anthony.foiani@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uio/gen-pci: don't enable interrupts in ISR
Date: Mon, 8 Aug 2011 19:19:31 +0200 [thread overview]
Message-ID: <20110808171931.GB867@local> (raw)
In-Reply-To: <20110808062431.GB5182@redhat.com>
On Mon, Aug 08, 2011 at 09:24:31AM +0300, Michael S. Tsirkin wrote:
> On Fri, Aug 05, 2011 at 02:15:07AM +0200, Hans J. Koch wrote:
> > On Fri, Aug 05, 2011 at 12:04:13AM +0300, Michael S. Tsirkin wrote:
> > > On Thu, Aug 04, 2011 at 10:46:06PM +0200, Sebastian Andrzej Siewior wrote:
> > > > As reported by Anthony in a short way:
> > > >
> > > > |irq 17 handler uio_interrupt+0x0/0x68 enabled interrupts
> > > > |NIP [c0069d84] handle_irq_event_percpu+0x260/0x26c
> > > >
> > > > The problem here is that spin_unlock_irq() enables the interrupts which
> > > > is a no-no in interrupt context because they always run with interrupts
> > > > disabled. This is the case even if IRQF_DISABLED has not been specified
> > > > since v2.6.35. Therefore this patch uses simple spin_locks().
> > > >
> > > > Looking at it further here is only one spot where the lock is hold. So
> > > > giving the fact that an ISR is not reentrant and is not executed on two
> > > > cpus at the same time why do we need a lock here?
> > >
> > > I'm not sure anymore. I think the idea was to use
> > > it for synchronization down the road somehow,
> > > but it never materialized. Let's drop that lock completely.
> >
> > That sounds reasonable.
Should I hack up a patch to remove the lock, or do you have anything in your
pipeline?
> >
> > >
> > > > The driver lacks of ->irqcontrol function so I guess the interrupt is
> > > > enabled via direct PCI-access in userland.
> > >
> > > Through sysfs.
> >
> > How? With /sys/devices/pci.../enable ?
> >
> > Thanks,
> > Hans
>
> No. By writing to the command register using
> /sys/bus/pci/devices/.../config
Hope that works at all times...
Anyway, the spin_lock in uio_pci_generic.c definetly doesn't help.
Thanks,
Hans
next prev parent reply other threads:[~2011-08-08 17:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-04 20:46 [PATCH] uio/gen-pci: don't enable interrupts in ISR Sebastian Andrzej Siewior
2011-08-04 21:04 ` Michael S. Tsirkin
2011-08-05 0:15 ` Hans J. Koch
2011-08-08 6:24 ` Michael S. Tsirkin
2011-08-08 17:19 ` Hans J. Koch [this message]
2011-08-09 11:37 ` Michael S. Tsirkin
2011-08-09 18:53 ` Hans J. Koch
2011-08-10 8:40 ` Michael S. Tsirkin
2011-08-23 0:49 ` [stable] " Greg KH
2011-08-23 8:40 ` Sebastian Andrzej Siewior
2011-08-23 10:57 ` Hans J. Koch
2011-08-23 11:00 ` Hans J. Koch
2011-08-05 19:18 ` Sebastian Andrzej Siewior
2011-08-08 6:40 ` Michael S. Tsirkin
2011-08-09 11:43 ` Sebastian Andrzej Siewior
2011-08-09 12:02 ` Michael S. Tsirkin
2011-08-10 8:33 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110808171931.GB867@local \
--to=hjk@hansjkoch.de \
--cc=anthony.foiani@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=chrisw@redhat.com \
--cc=gregkh@suse.de \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox