Re: is there a way not to believe the bios' IRQ prog and use the $PIR?

From: othermark <atkin901_at_yahoo.com>
Date: Mon, 11 Jul 2005 12:55:54 -0700
John Baldwin wrote:

> On Monday 11 July 2005 12:17 pm, othermark wrote:
>> Hi,
>>
>> I believe since the following commit, I have had serious problems with
>> interrupts on one class of machines (TYAN S1867 - thunder 2500):
>>
>> http://article.gmane.org/gmane.os.freebsd.devel.cvs.src/46247/
>>
>> Is there a tunable I'm not aware of that I could revert back to
>> not believing the BIOS and use the $PIR entries?
> 
> You can override the IRQs for any link device by setting
> hw.pci.link.0x12.irq=XX to set link 0x12 to irq XX for example.  You could
> also modify $PIR to never trust a BIOS value > 16:
> 
> --- //depot/vendor/freebsd/src/sys/i386/pci/pci_pir.c 2005/04/14 18:25:24
> +++ //depot/user/jhb/acpipci/i386/pci/pci_pir.c       2005/07/11 18:13:16
> _at__at_ -327,6 +327,15 _at__at_
>  if (irq == PCI_INVALID_IRQ || irq == pci_link->pl_irq)
>  return;
>  
> +     /* Don't trust any BIOS IRQs greater than 15. */
> +     if (irq >= NUM_ISA_INTERRUPTS) {
> +             printf(
> +     "$PIR: Ignoring invalid BIOS IRQ %d from %d.%d.INT%c for link %#x\n",
> +                 irq, entry->pe_bus, entry->pe_device, pin + 'A',
> +                 pci_link->pl_id);
> +             return;
> +     }
> +
>  /*
>  * If we don't have an IRQ for this link yet, then we trust the
>  * BIOS, even if it seems invalid from the $PIR entries.
> _at__at_ -334,7 +343,7 _at__at_
>  if (pci_link->pl_irq == PCI_INVALID_IRQ) {
>  if (!pci_pir_valid_irq(pci_link, irq))
>  printf(
> -     "$PIR: Using invalid BIOS IRQ %d from %d.%d.INT%c is for link %#x\n",
> +     "$PIR: Using invalid BIOS IRQ %d from %d.%d.INT%c for link %#x\n",
>  irq, entry->pe_bus, entry->pe_device, pin + 'A',
>  pci_link->pl_id);
>  pci_link->pl_irq = irq;
> 

At first blush this seems to do the trick!  My log used to be flooded with
the following on this machine, but now under simultaneous load with that
patch I get none:

Jul 11 18:44:59 consrv kernel: sio17: 171 more interrupt-level buffer
overflows(total 5881)
Jul 11 18:45:30 consrv kernel: sio17: 26 more interrupt-level buffer
overflows (total 5907)
Jul 11 18:46:00 consrv kernel: sio17: 48 more interrupt-level buffer
overflows (total 5955)

-- 
othermark
atkin901 at nospam dot yahoo dot com
(!wired)?(coffee++):(wired);
Received on Mon Jul 11 2005 - 17:58:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:38 UTC