Subject: Re: Why don't we trust ACPI for interrupt routing?
To: Martin Husemann <martin@duskware.de>
From: Frank van der Linden <fvdl@netbsd.org>
List: port-i386
Date: 08/26/2006 11:21:37
Martin Husemann wrote:
> Please excuse if this is a stupid question - my i386 knowledge is limited
> and I know nothing about ACPI.
>
> I have a problem though, and the full story is recorded in PR 33922.
>
> On my notebook the ath0 wlan and the auich0 sound device share an
> interrupt, and both point to an acpi link dev that ends up in 
> NetBSD as:
>
>  Link Device LNKB:
>  Index  IRQ  Rtd  Ref  IRQs
>      0  255   N     5  5 7
>
>
> The offerered IRQs (5 and 7) would be fine AFAICT (windows uses 5), but
> NetBSD rejects them, because they are not in the pci_link_bios_isa_irqs
> bitmask. (The code is in sys/dev/acpi/acpi_pci_link.c, function
> acpi_pci_link_choose_irq.)
>
> Can anyone explain the reasoning for this additional test and why we don't
> trust ACPI to tell us the truth? Maybe we should have at least a kernel
> option to do so (simplest implementation: just initialize the bitmask to
> all 1s, but I'm not sure there would be some other IRQ initialization
> needed in this case).
>
> Martin
>   
Hey Martin,

Try just setting pci_link_bios_isa_irqs at all 1s, or just take out the 
test for it in acpi_pci_link_choose_irq().  The code seems to prefer 
IRQs that have been initialized by the BIOS (e.g. ones that have been 
written into the PCI interrupt line config register).  I doubt whether 
that's a good strategy, but I left it in, as I thought "this code has 
been in FreeBSD for a while, and I saw no bug reports about it". Of 
course, that doesn't have to mean anything..

- Frank