Jaroslav Kysela wrote:
> 
> On Tue, 29 Aug 2000, M.H.VanLeeuwen wrote:
> 
> > With default BIOS settings, IRQ 5 is unavailable for ISA yet
> > it is being assigned by the ne.c driver and NFS root system
> > doesn't finish booting.
> >
> > Is this a driver problem or a ISAPNP problem?
> 
> It is general IRQ manager problem. ISA PnP code cannot determine which
> interrupts cannot be used. I think that we need some next layer between
> IO APIC control code and Plug & Play routines to exchange this information
> to prevent allocation of a free but unuseable IRQ for ISA PnP devices.
> 
>                                                 Jaroslav
> 

Jaroslav,

This patch is a first approximation to the above problem, can U look it over?

Basically, it discards any unusable IO_APIC IRQs from the list of IRQs that
ISA PNP is trying to allocate from - but only if IO_APIC IRQs are available.
This works for none APIC systems as well since io_apic_irqs s/b zero if
APIC's don't exist.

Comments?
Martin

--- /home/mhvl/linux.orig/drivers/pnp/isapnp.c  Tue Jul 25 20:25:14 2000
+++ isapnp.c    Mon Sep 18 21:28:39 2000
@@ -33,10 +33,10 @@
 #include <linux/delay.h>
 #include <asm/io.h>
 #include <asm/dma.h>
-#include <asm/irq.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/isapnp.h>
+#include <linux/irq.h>

 LIST_HEAD(isapnp_cards);
 LIST_HEAD(isapnp_devices);
@@ -1598,6 +1598,8 @@

        if (irq < 0 || irq > 15)
                return 1;
+       if (!IO_APIC_IRQ(irq) && io_apic_irqs)
+               return 1;
        for (i = 0; i < 16; i++) {
                if (isapnp_reserve_irq[i] == irq)
                        return 1;
--- /home/mhvl/linux.orig/drivers/pnp/isapnp_proc.c     Wed Jul 12 23:58:43 2000
+++ isapnp_proc.c       Wed Sep 13 22:39:47 2000
@@ -30,6 +30,7 @@
 #include <asm/uaccess.h>
 #include <linux/smp_lock.h>
 #include <linux/isapnp.h>
+#include <linux/irq.h>

 struct isapnp_info_buffer {
        char *buffer;           /* pointer to begin of buffer */
@@ -448,7 +449,7 @@

        isapnp_printf(buffer, "%sIRQ ", space);
        for (i = 0; i < 16; i++)
-               if (irq->map & (1<<i)) {
+               if (irq->map & (1<<i) && (IO_APIC_IRQ(i) || !io_apic_irqs)) {
                        if (!first) {
                                isapnp_printf(buffer, ",");
                        } else {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to