Hello!

> Magic!  It works just right with this option. irq11 allocated as expected.
> 
> Now, tell me what is the reasoning behind this option. Where can I read 
> more about it?

   The irqmask option tells the kernel to override the mask of free IRQ's
supplied by the BIOS by anything you wish.

   Anyway, it seems that depending on the BIOS IRQ mask was a mistake.
This patch (just submitted to Linus) should fix it.

                                Have a nice fortnight
-- 
Martin `MJ' Mares <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> http://atrey.karlin.mff.cuni.cz/~mj/
"COBOL -- Completely Outdated, Badly Overused Language"


--- arch/i386/kernel/pci-irq.c.mj       Mon Apr 17 16:07:12 2000
+++ arch/i386/kernel/pci-irq.c  Mon Apr 17 16:10:29 2000
@@ -26,14 +26,14 @@
 
 /*
  * Never use: 0, 1, 2 (timer, keyboard, and cascade)
- * Avoid using: 13, 14 and 15 (FP error and IDE).
+ * Avoid using: 6, 13, 14 and 15 (FDC, FP error and IDE).
  * Penalize: 3, 4, 7, 12 (known ISA uses: serial, parallel and mouse)
  */
 unsigned int pcibios_irq_mask = ~0;
 
 static unsigned pirq_penalty[16] = {
-       10000, 10000, 10000, 100, 100, 0, 0, 100,
-       0, 0, 0, 0, 100, 1000, 1000, 1000
+       10000, 10000, 10000, 200, 200, 0, 1000, 200,
+       0, 0, 0, 0, 200, 1000, 1000, 1000
 };
 
 struct irq_router {
@@ -299,16 +299,12 @@
                return 0;
        }
        pirq = info->irq[pin].link;
-       mask = info->irq[pin].bitmap;
+       mask = info->irq[pin].bitmap & pcibios_irq_mask;
        if (!pirq) {
                DBG(" -> not routed\n");
                return 0;
        }
-       DBG(" -> PIRQ %02x, mask %04x, excl %04x", pirq, mask, 
pirq_table->exclusive_irqs);
-       if (pcibios_irq_mask != ~0)
-               mask &= pcibios_irq_mask;
-       else
-               mask &= pirq_table->exclusive_irqs;
+       DBG(" -> PIRQ %02x, mask %04x", pirq, mask);
 
        /* Find the best IRQ to assign */
        newirq = 0;
@@ -369,8 +365,13 @@
                pirq_table = pcibios_get_irq_routing_table();
 #endif
        if (pirq_table) {
+               int i;
                pirq_peer_trick();
                pirq_find_router();
+               /* Penalize IRQ's which are not dedicated to PCI */
+               for (i=0; i<16; i++)
+                       if (!(pirq_table->exclusive_irqs & (1 << i)))
+                               pirq_penalty[i] += 100;
        }
 
        pci_for_each_dev(dev) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to