public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Peter Chubb <peterc@gelato.unsw.edu.au>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)
Date: Mon, 14 Mar 2005 23:32:30 -0500	[thread overview]
Message-ID: <1110861150.15588.44.camel@mindpipe> (raw)
In-Reply-To: <9e47339105031218035f323d68@mail.gmail.com>

On Sat, 2005-03-12 at 21:03 -0500, Jon Smirl wrote:
> On Fri, 11 Mar 2005 19:14:13 +0000, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > I posted a proposal for this sometime ago because X has some uses for
> > it. The idea being you'd pass a struct that describes
> > 
> > 1.      What tells you an IRQ occurred on this device
> > 2.      How to clear it
> > 3.      How to enable/disable it.
> > 
> > Something like
> > 
> >         struct {
> >                 u8 type;                /* 8, 16, 32  I/O or MMIO */
> >                 u8 bar;                 /* PCI bar to use */
> >                 u32 offset;             /* Into bar */
> >                 u32 mask;               /* Bits to touch/compare */
> >                 u32 value;              /* Value to check against/set */
> >         }
> >
> 
> It might useful to add this to the main kernel API, and then over time
> modify all of the drivers to use it. If a driver does this it would be
> safe to transparently move it to user space like in UML or xen.  I've
> been told that PCI Express and MSI does not have this problem.
> 

This seems sufficient for the simplest devices, that just have an
IRQ_PENDING and an IRQ_ACK register.  But what about a device like the
emu10k1 where you have a half loop and loop interrupt for each of 64
channels, plus about 10 other interrupt sources?  The IPR just tells you
there's a channel loop interrupt pending, in order to properly ACK it
you need to set a bit in one of 4 registers depending on whether it's a
loop or half loop interrupt, and whether the channel is 0-31 or 32-64.

Lee


  reply	other threads:[~2005-03-15  4:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-11  3:36 User mode drivers: part 1, interrupt handling (patch for 2.6.11) Peter Chubb
2005-03-11 10:29 ` Pavel Machek
2005-03-12 16:27   ` Jon Smirl
2005-03-12 18:55     ` Jon Smirl
2005-03-14  0:39     ` Peter Chubb
2005-03-14  1:24       ` Jon Smirl
2005-03-11 13:50 ` Michael Raymond
2005-03-11 17:25   ` Greg KH
2005-03-11 17:31     ` Michael Raymond
2005-03-11 19:14 ` Alan Cox
2005-03-13  2:03   ` Jon Smirl
2005-03-15  4:32     ` Lee Revell [this message]
2005-03-15 13:28       ` Alan Cox
2005-03-14  0:02   ` Peter Chubb
2005-03-14 13:33     ` Alan Cox
2005-03-15  3:15       ` Jon Smirl
2005-03-12 15:55 ` Jon Smirl
2005-03-12 17:11   ` Zwane Mwaikambo
2005-03-14  1:55     ` Jon Smirl
2005-03-14  3:04       ` Peter Chubb
2005-03-14  0:36   ` Peter Chubb
     [not found]     ` <9e47339105031317193c28cbcf@mail.gmail.com>
2005-03-14  1:42       ` Peter Chubb
2005-03-14  1:52         ` Jon Smirl
2005-03-14  3:06           ` Peter Chubb
2005-03-15  3:19         ` Jon Smirl
2005-03-15  3:47           ` Peter Chubb
2005-03-15  3:50             ` Jon Smirl
2005-03-15  4:11               ` Peter Chubb
  -- strict thread matches above, loose matches on Subject: below --
2005-03-15 19:20 Stephen Warren

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=1110861150.15588.44.camel@mindpipe \
    --to=rlrevell@joe-job.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterc@gelato.unsw.edu.au \
    /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