Subject: Re: explanation of PCI cardbus bridge code...
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 02/20/2006 15:03:49
On Feb 20, 2006, at 7:54 AM, Garrett D'Amore wrote:

> Can anyone explain the following code:
>
> #if NIOAPIC > 0
>     printf("%s: using ioapic for interrupt\n", sc->sc_dev.dv_xname);
> #else
>     if ((0 == pa->pa_intrline) || (255 == pa->pa_intrline)) {
>             printf("%s: NOT USED because of unconfigured interrupt\n",
>             sc->sc_dev.dv_xname);
>         return;
>     }
> #endif
>
> This breaks pccb on sparc, and as far as I can tell, pa- 
> >pa_intrline is
> not actually used anywhere in the code.  (The IRQ register in PCI
> configuration space is "machine dependent", and on SPARC isn't used  
> at all.)

I would like to get rid of pa_intrline completely.  Its function is  
completely superseded by pci_intr_map().

>
> I think the above code is pretty PC-specific.  Can it be removed, or
> #ifdef i386'd?
>
> -- 
> Garrett D'Amore, Principal Software Engineer
> Tadpole Computer / Computing Technologies Division,
> General Dynamics C4 Systems
> http://www.tadpolecomputer.com/
> Phone: 951 325-2134  Fax: 951 325-2191

-- thorpej