Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)
From: Jon Smirl (jonsmirl_at_gmail.com)
Date: 03/12/05
- Previous message: Adrian Bunk: "[2.6 patch] drivers/char/mwave/tp3780i.c: remove kernel 2.2 #if's"
- In reply to: Peter Chubb: "User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Next in thread: Zwane Mwaikambo: "Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Reply: Zwane Mwaikambo: "Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Reply: Peter Chubb: "Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 12 Mar 2005 10:55:21 -0500 To: Peter Chubb <peterc@gelato.unsw.edu.au>
On Fri, 11 Mar 2005 14:36:10 +1100, Peter Chubb
<peterc@gelato.unsw.edu.au> wrote:
>
> As many of you will be aware, we've been working on infrastructure for
> user-mode PCI and other drivers. The first step is to be able to
> handle interrupts from user space. Subsequent patches add
> infrastructure for setting up DMA for PCI devices.
I've tried implementing this before and could not get around the
interrupt problem. Most interrupts on the x86 architecture are shared.
Disabling the IRQ at the PIC blocks all of the shared IRQs. This works
(hope your userspace handler is last on the shared handler list) until
you have a problem in userspace.
Once you have a problem in userspace there is no way to acknowledge
the interrupt anymore. I tried to address that by maintaining a timer
and suspending the hardware through the D0 state to reset it. That had
some success. Not acknowledging the interrupt results in an interrupt
loop and reboot.
The problem can be mitigated by choosing what slot your hardware to
put your hardware in. This can reduce the number of shared interrupts.
If you can get exclusive use of the interrupt this method will work.
If I were designing a new bus I would make interrupt acknowledge part
of PCI config space in order to allow a single piece of code to
acknowledge them. Since we can't change the bus the only safe way to
do this is to build a hardware specific driver for each device to
acknowledge the interrupt.
Bottom line is that I could find no reliable solution for handing interrupts.
-- Jon Smirl jonsmirl@gmail.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Adrian Bunk: "[2.6 patch] drivers/char/mwave/tp3780i.c: remove kernel 2.2 #if's"
- In reply to: Peter Chubb: "User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Next in thread: Zwane Mwaikambo: "Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Reply: Zwane Mwaikambo: "Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Reply: Peter Chubb: "Re: User mode drivers: part 1, interrupt handling (patch for 2.6.11)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|